Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify test workflow and attempt to fail an early step #27

Merged
merged 14 commits into from
Nov 12, 2024
Merged
7 changes: 7 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,22 @@ jobs:
name: Python Lint
runs-on: ubuntu-latest
steps:
# Fetch the code and set up an interpreter
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

# Satisfy remaining requirements to lint the code
- name: Install Python dependencies
run: pip install black flake8

# Run lint
# Failure behavior
# 1. When all steps above have completed successfully, begin lint execution
# 2. When failure occurs, then indicate the failure in all associated PR checkers
# 3. Do NOT halt lint execution (i.e. proceed if possible)
- name: Run linters
uses: wearerequired/[email protected]
with:
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,37 @@ jobs:
name: Full Regression Test
runs-on: ubuntu-latest
steps:
# Fetch the code and set up an interpreter
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

# Satisfy remaining requirements to run the code
- name: Install dependencies
run: |
pip install -r worker/source/requirements.txt
- name: Run unit tests
if: always()

# Run tests
# 1. When all steps above have completed successfully, begin test execution
# 2. When failure occurs, then indicate it in the associated PR checker
# 3. Do NOT halt test execution (i.e. proceed if possible)
# Note: In order to support 3 above, the always() status function ensures
# that the conditional is evaluated independently - NOT prepended with with
# "success() && " (i.e. default)
- name: Prepare for testing
id: prepare
run: |
cd worker/source/
- name: Run unit tests
run: |
pytest -vv --durations=0 -s -m unit
- name: Run integration tests
if: always()
if: steps.prepare.outcome == 'success' && always()
run: |
cd worker/source/
pytest -vv --durations=0 -s -m integration
- name: Run system tests
if: always()
if: steps.prepare.outcome == 'success' && always()
run: |
cd worker/source/
pytest -vv --durations=0 -s -m system
Loading