simplify test workflow and attempt to fail an early step #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [ 'master' ] | |
pull_request: | |
branches: [ 'master' ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
test_full_regression: | |
name: Full Regression Test | |
runs-on: ubuntu-latest | |
steps: | |
# Fetch the code to be tested | |
- uses: actions/checkout@v4 | |
# Satisfy remaining requirements to run the code | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
pip install -r worker/source/requirements.txt | |
# Run tests | |
# Failure behavior | |
# 1. When all steps above have completed successfully, begin test execution | |
# 2. When failure occurs, then indicate the failure in the associated PR checker | |
# 3. Do NOT halt test execution (i.e. proceed if possible) | |
# Note: In order to support failure behavior 3 above, the always() status function | |
# appears below to avoid the default, which is success(). | |
- 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: steps.prepare.outcome == 'success' && always() | |
run: | | |
pytest -vv --durations=0 -s -m integration | |
- name: Run system tests | |
if: steps.prepare.outcome == 'success' && always() | |
run: | | |
pytest -vv --durations=0 -s -m system |