diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 38289cc4..e83f7e6d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -101,6 +101,10 @@ jobs: pytest: name: Pytest runs-on: ubuntu-20.04 + needs: chores # Ensure pytest runs only after chores job is completed + + # Run pytest only if black, isort, and license pass + if: ${{ success() && steps.black.outcome == 'success' && steps.isort.outcome == 'success' && steps.license.outcome == 'success' }} steps: - uses: actions/checkout@v3 @@ -125,7 +129,7 @@ jobs: regression_tests: name: Regression Tests runs-on: ubuntu-20.04 - needs: pytest # ensure regression tests are only run if tests pass + needs: pytest # Ensure regression tests are only run if pytest job passes steps: - uses: actions/checkout@v3 @@ -152,4 +156,4 @@ jobs: else echo "No regression test results found in main branch" fi - pytest -m regression \ No newline at end of file + pytest -m regression