Skip to content

Commit

Permalink
feat: Update CI to only run fast tests tests in some circumstances
Browse files Browse the repository at this point in the history
  • Loading branch information
stbrody authored and smrz2001 committed Nov 3, 2023
1 parent 81b7716 commit f142bbd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/hermetic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,14 @@ jobs:
export TEST_NETWORK=./networks/${{ matrix.networks }}.yaml
chmod +x ./bin/hermetic-driver
# For schedule events, "test_selector" will be null, so default to running all tests.
# For scheduled events, "test_selector" will be null, so default to running all tests.
test_selector=${{ github.event.inputs.test_selector || '.' }}
# TODO: Uncomment once we have "fast" tests
# For PR and merge group events, run only "fast" tests.
# if [[ ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }} ]]; then
# test_selector="fast"
# fi
# Note it is not possible to override "test_selector" for these types of events.
if [[ ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }} ]]; then
test_selector="fast"
fi
make TEST_SELECTOR="$test_selector" HERMETIC_CMD=./bin/hermetic-driver hermetic-tests
collect-results:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/schedule-durable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ jobs:
# "workflow_dispatch" API call.
DURABLE_TEST_BRANCH: ${{ steps.get_branch.outputs.branch }}
run: |
# For schedule events, "test_selector" will be null. Run all tests for QA but only "fast" ones for other envs.
# For scheduled events, "test_selector" will be null. Run all tests for QA but only "fast" ones for other envs.
test_selector=${{ github.event.inputs.test_selector || '.' }}
# TODO: Uncomment once we have "fast" tests
# if [[ -z ${{ github.event.inputs.test_selector }} ]]; then
# if [[ ${{ matrix.network != 'qa' }} ]]; then
# test_selector="fast"
# fi
# fi
if [[ -z ${{ github.event.inputs.test_selector }} ]]; then
if [[ ${{ matrix.network != 'qa' }} ]]; then
test_selector="fast"
fi
fi
make TEST_SELECTOR="$test_selector" schedule-durable-tests

0 comments on commit f142bbd

Please sign in to comment.