Skip to content

Commit

Permalink
enh: fail test job if isort, black fail, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsbck committed Dec 3, 2024
1 parent d7c4396 commit e1335eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -152,4 +156,4 @@ jobs:
else
echo "No regression test results found in main branch"
fi
pytest -m regression
pytest -m regression

0 comments on commit e1335eb

Please sign in to comment.