Skip to content

Commit

Permalink
parallelize some of the extra tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fczuardi committed Feb 6, 2025
1 parent 9773e6f commit 520f1dc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/pull-request-extra-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:
types: [opened, synchronize, reopened]

jobs:
run_extra_tests:
# tests that we are not debugging at the moment,
# tests that can run in parallel with pytest-xdist
# it's ok to run only on br-ne1
extra_tests_dist:
strategy:
fail-fast: false
matrix:
Expand All @@ -26,18 +29,34 @@ jobs:
- bucket_versioning
config:
- "../params/br-ne1.yaml"
uses: ./.github/workflows/run-tests.yml
with:
config: "${{ matrix.config }}"
flags: "-v -n auto --color yes -m '${{ matrix.category }}'"
# runner: "self-hosted"
secrets:
PROFILES: ${{ secrets.PROFILES }}

# tests that we want to see all logging messages
# tests that we want to test on both regions
extra_tests_debug:
strategy:
fail-fast: false
matrix:
category:
- locking
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]
needs: [extra_tests_debug, extra_tests_dist]
if: always()
uses: ./.github/workflows/cleanup-tests.yml
secrets:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run Tests
on:
workflow_call:
inputs:
tests: { required: false, type: string }
tests: { required: false, type: string, default: "*_test.py"}
config: { required: true, type: string }
flags: { required: true, type: string }
runner: { required: false, type: string, default: "ubuntu-24.04" }
Expand Down Expand Up @@ -53,4 +53,5 @@ jobs:
- name: Run tests ${{ inputs.tests }}
run: |
cd docs
sha256sum $(which mgc rclone aws)
uv run pytest --config ${{ inputs.config }} ${{ inputs.tests }} ${{ inputs.flags }}

0 comments on commit 520f1dc

Please sign in to comment.