[narps_open_pipelines#220][94GU] Preprocessing #473
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
## Disclaimer - This GitHub Actions workflow runs all the unit tests for the project. | |
# Name the workflow | |
name: unit_testing | |
# Define when it runs | |
on: | |
push: | |
paths: | |
- 'narps_open/**' | |
- 'setup.py' | |
- 'pytest.ini' | |
- 'tests/conftest.py' | |
pull_request: | |
paths: | |
- 'narps_open/**' | |
- 'setup.py' | |
- 'pytest.ini' | |
- 'tests/conftest.py' | |
# Jobs that define the workflow | |
jobs: | |
# Name of the job running unit tests | |
pytest: | |
# Define the runner for this job | |
runs-on: self-hosted | |
# Steps that define the job | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Load configuration for self-hosted runner | |
run: cp /home/neuro/local_testing_config.toml narps_open/utils/configuration/testing_config.toml | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[tests] | |
- name: Launch tests with pytest & get code coverage | |
run: | | |
coverage run -m pytest --junit-xml=pytest_report.xml -m "not pipeline_test" | |
coverage report | |
coverage xml | |
- name: Archive pytest results | |
if: ${{ failure() }} # Run only if previous job fails | |
uses: actions/upload-artifact@v3 | |
with: | |
name: unit_tests-reports | |
path: | | |
pytest_report.xml | |
coverage.xml | |
retention-days: 15 |