From 6ebbd932d0b920deddf5c74e491dde8fca3ae51c Mon Sep 17 00:00:00 2001 From: mongolyy Date: Fri, 5 Jan 2024 22:26:08 +0900 Subject: [PATCH] github-check/github-pr-check change testing method --- .github/workflows/test.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40b4ab4..313b995 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,30 +10,28 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - id: action-success-test - name: action-success-test + - name: action-success-test uses: ./ with: github_token: ${{ secrets.github_token }} workdir: ./testdata reporter: github-check + level: error filter_mode: nofilter fail_on_error: true biome_flags: ok/ - - id: action-failure-test - name: action-failure-test + # github-check test is judged to fail if an error occurs even if continue-on-error is set to true. + # Therefore, the test for failure should also succeed by setting the report level to warning. + - name: action-failure-test uses: ./ - continue-on-error: true with: github_token: ${{ secrets.github_token }} workdir: ./testdata reporter: github-check + level: warning filter_mode: nofilter fail_on_error: true biome_flags: error/ - - name: check-failure - if: steps.action-failure-test.outcome == 'success' - run: exit 1 test-pr-check: if: github.event_name == 'pull_request' @@ -41,30 +39,29 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - id: action-success-test - name: action-success-test + - name: action-success-test uses: ./ with: github_token: ${{ secrets.github_token }} workdir: ./testdata reporter: github-pr-check + level: error filter_mode: nofilter fail_on_error: true biome_flags: ok/ - - id: action-failure-test - name: action-failure-test + # github-pr-check test is judged to fail if an error occurs even if continue-on-error is set to true. + # Therefore, the test for failure should also succeed by setting the report level to warning. + - name: action-failure-test uses: ./ continue-on-error: true with: github_token: ${{ secrets.github_token }} workdir: ./testdata reporter: github-pr-check + level: warning filter_mode: nofilter fail_on_error: true biome_flags: error/ - - name: check-failure - if: steps.action-failure-test.outcome == 'success' - run: exit 1 test-pr-review: if: github.event_name == 'pull_request' @@ -79,6 +76,7 @@ jobs: github_token: ${{ secrets.github_token }} workdir: ./testdata reporter: github-pr-review + level: error filter_mode: nofilter fail_on_error: true biome_flags: ok/ @@ -90,6 +88,7 @@ jobs: github_token: ${{ secrets.github_token }} workdir: ./testdata reporter: github-pr-review + level: error filter_mode: nofilter fail_on_error: true biome_flags: error/