-
Notifications
You must be signed in to change notification settings - Fork 19
38 lines (38 loc) · 1.11 KB
/
Lint-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Lint-and-test
on: [pull_request, workflow_call]
jobs:
call-linter-workflow:
uses: ISISComputingGroup/reusable-workflows/.github/workflows/linters.yml@main
with:
compare-branch: origin/main
python-ver: '3.11'
tests:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['3.10','3.11']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
- name: install requirements
run: pip install -e .[dev]
- name: run unit tests
run: python -m pytest .
- name: run system tests
working-directory: ./system_tests
run: python -m pytest --approvaltests-use-reporter='PythonNativeReporter' lewis_tests.py
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [call-linter-workflow, tests]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}