Skip to content

Commit

Permalink
Updates flakeguard version and inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
kalverra committed Nov 22, 2024
1 parent 5dc8f7f commit 8862dd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/flakeguard-on-demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ on:
type: boolean
description: 'Run all tests in the project.'
default: true
runThreshold:
maxPassRatio:
required: false
type: string
description: 'Minimum pass ratio for considering a test as flaky.'
description: 'The maximum (non-inclusive) pass ratio threshold for a test to be considered a failure. Any tests below this pass rate will be considered flaky.'
default: '1.0'
findByTestFilesDiff:
required: false
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
baseRef: ${{ inputs.baseRef }}
projectPath: ${{ inputs.projectPath }}
headRef: ${{ inputs.headRef }}
runThreshold: ${{ inputs.runThreshold }}
maxPassRatio: ${{ inputs.maxPassRatio }}
runAllTests: ${{ inputs.runAllTests }}
findByTestFilesDiff: ${{ inputs.findByTestFilesDiff }}
findByAffectedPackages: ${{ inputs.findByAffectedPackages }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/flakeguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ on:
type: boolean
description: 'Run all tests in the project.'
default: false
runThreshold:
maxPassRatio:
required: false
type: string
description: 'Minimum pass ratio for considering a test as flaky.'
description: 'The maximum (non-inclusive) pass ratio threshold for a test to be considered a failure. Any tests below this pass rate will be considered flaky.'
default: '1.0'
findByTestFilesDiff:
required: false
Expand Down Expand Up @@ -64,7 +64,6 @@ env:
DEFAULT_RUNNER: 'ubuntu-latest' # The default runner to use for running tests.
UPLOAD_ALL_TEST_RESULTS: ${{ fromJson(inputs.extraArgs)['upload_all_test_results'] || 'false' }} # Whether to upload all test results as artifacts.
PRINT_FAILED_TESTS: ${{ fromJson(inputs.extraArgs)['print_failed_tests'] || 'false' }} # Whether to print failed tests in the GitHub console.
MIN_PASS_RATIO: ${{ fromJson(inputs.extraArgs)['min_pass_ratio'] || '0.001' }} # The minimum pass ratio for a test to be considered as flaky. Used to distinguish between tests that are truly flaky (with inconsistent results) and those that are consistently failing. Set to 0 if you want to consider all failed tests as flaky.

jobs:
get-tests:
Expand Down Expand Up @@ -258,11 +257,11 @@ jobs:

- name: Install flakeguard
shell: bash
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@8b02ed1703ef40755a4c46ff454cf4ff2e89275d
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@be06798af83ef6d9f7cf04e8b10a8484520c5061

- name: Run tests with flakeguard
shell: bash
run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --min-pass-ratio=${{ env.MIN_PASS_RATIO }} --threshold=${{ inputs.runThreshold }} --race=${{ env.RUN_WITH_RACE }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json
run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json
env:
CL_DATABASE_URL: ${{ env.DB_URL }}

Expand Down

0 comments on commit 8862dd5

Please sign in to comment.