Skip to content

Commit

Permalink
split PR pipeline in two workflows
Browse files Browse the repository at this point in the history
One for the must-pass tests, and another for
experimental or slow-to-finish tests.
  • Loading branch information
fczuardi committed Feb 5, 2025
1 parent 3e36bc3 commit 199e94d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 26 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pull-request-extra-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Tests that for one reason or another we dont want to make it a blocker for PRs
# it may be because they are slow, or because tey include features still in
# preview/not fully launched.
#
# It's ok for the output to be verbose as they might be here to help in the debugging
# of some behavior/flakiness.
#
# It's ok for tests here to fail or to be slow. They should not block any CI pipelines.
#
# Here we also run the tests on both regions.

name: Pull Request Extra Tests

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
run_extra_tests:
strategy:
fail-fast: false
matrix:
category:
- locking
- policy
- acl
config:
- "../params/br-ne1.yaml"
- "../params/br-se1.yaml"
uses: ./.github/workflows/run-tests.yml
with:
tests: "*_test.py"
config: "${{ matrix.config }}"
# no multiple workers here just to make it easier to audit the logs (more verbosity with INFO level)
flags: "-v --log-cli-level INFO --color yes -m '${{ matrix.category }}'"
secrets:
PROFILES: ${{ secrets.PROFILES }}

cleanup_tests:
needs: [run_extra_tests]
if: always()
uses: ./.github/workflows/cleanup-tests.yml
secrets:
PROFILES: ${{ secrets.PROFILES }}


34 changes: 8 additions & 26 deletions .github/workflows/pull-request-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
name: Run Test - Pull Request
# Tests that must pass in order for a PR to be allowed on the main branch
# it is expected that they finish fast, thal ALL tests pass
# and no verbose logging / debugging is enabled.
#
# They should run as much as possible in parallel.

name: Pull Request Essential Tests

on:
pull_request:
Expand Down Expand Up @@ -29,33 +35,9 @@ jobs:
run:
exit 0

# tests that for one reason or another we dont want to make it a blocker for PRs
# it may be because they are slow, or because tey include features still in preview/not fully
# launched
run_extra_tests:
strategy:
fail-fast: false
matrix:
category:
- locking
- policy
- acl
config:
- "../params/br-ne1.yaml"
- "../params/br-se1.yaml"
uses: ./.github/workflows/run-tests.yml
with:
tests: "*_test.py"
config: "${{ matrix.config }}"
# no multiple workers here just to make it easier to audit the logs (more verbosity with INFO level)
flags: "-v --log-cli-level INFO --color yes -m '${{ matrix.category }}'"
secrets:
PROFILES: ${{ secrets.PROFILES }}

cleanup_tests:
needs: [tests_success, run_extra_tests]
needs: [run_tests]
if: always()
uses: ./.github/workflows/cleanup-tests.yml
secrets:
PROFILES: ${{ secrets.PROFILES }}

0 comments on commit 199e94d

Please sign in to comment.