Skip to content

Commit a98fd93

Browse files
authored
Merge pull request #171 from ucl-bug/helmholtz-regression-test
Helmholtz regression test
2 parents 8059cd7 + c3b59c9 commit a98fd93

26 files changed

Lines changed: 1193 additions & 723 deletions

.github/workflows/build_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [3.9]
14+
python-version: [3.11]
1515

1616
steps:
1717
- uses: actions/checkout@v3

.github/workflows/main.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# This is a workflow for Unit, Integration, and Regression Tests
2+
3+
name: Unit, Integration and Regression Tests
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
workflow_dispatch:
11+
12+
jobs:
13+
unit_and_integration_tests:
14+
strategy:
15+
matrix:
16+
python-version: [3.11]
17+
os: [ubuntu-latest]
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Making virtual environment, linting
25+
run: |
26+
make testenv
27+
- name: Downloading test data
28+
run: |
29+
make get_test_data
30+
- name: Running tests
31+
run: |
32+
source .venv/bin/activate
33+
coverage run --source=jwave -m pytest -xvs --ignore=tests/regression_tests
34+
- name: "Upload coverage data for unit and integration tests"
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: coverage-unit
38+
path: ./.coverage
39+
40+
regression_tests:
41+
strategy:
42+
matrix:
43+
python-version: [3.11]
44+
os: [ubuntu-latest]
45+
runs-on: ${{ matrix.os }}
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: actions/setup-python@v4
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
- name: Making virtual environment, linting
52+
run: |
53+
make testenv
54+
- name: Downloading test data
55+
run: |
56+
make get_test_data
57+
- name: Running tests
58+
run: |
59+
source .venv/bin/activate
60+
coverage run --source=jwave -m pytest -xvs ./tests/regression_tests
61+
- name: "Upload coverage data for regression tests"
62+
uses: actions/upload-artifact@v2
63+
with:
64+
name: coverage-regression
65+
path: ./.coverage
66+
67+
combine_coverage:
68+
needs: [unit_and_integration_tests, regression_tests]
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v3
72+
- uses: actions/setup-python@v4
73+
with:
74+
python-version: 3.11
75+
- name: Install coverage
76+
run: pip install coverage
77+
- name: Download coverage data
78+
uses: actions/download-artifact@v2
79+
with:
80+
name: coverage-unit
81+
path: unit
82+
- name: Download coverage data
83+
uses: actions/download-artifact@v2
84+
with:
85+
name: coverage-regression
86+
path: regression
87+
- name: Combine coverage data
88+
run: |
89+
mv unit/.coverage .coverage.unit
90+
mv regression/.coverage .coverage.regression
91+
coverage combine
92+
coverage xml
93+
- name: "Upload combined coverage to Codecov"
94+
uses: codecov/codecov-action@v3
95+
with:
96+
token: ${{ secrets.CODECOV_TOKEN }}
97+
files: ./coverage.xml
98+
name: codecov-umbrella

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: pycln
66
args: [--config=pyproject.toml]
77
- repo: https://github.com/pycqa/isort
8-
rev: '5.10.1'
8+
rev: '5.12.0'
99
hooks:
1010
- id: isort
1111
files: "\\.(py)$"

0 commit comments

Comments
 (0)