Skip to content

Commit 8c0bcc5

Browse files
authored
Split project tests (#426)
1 parent 41404fe commit 8c0bcc5

File tree

99 files changed

+329
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+329
-76
lines changed

.github/workflows/ci_pipeline.yml

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ jobs:
4141
runs-on: ubuntu-latest
4242

4343
strategy:
44+
fail-fast: false
4445
matrix:
45-
python: ['3.8', '3.9', '3.10']
4646
env: ['base', 'fenics', 'mpi4py', 'petsc']
47+
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
4748

4849
defaults:
4950
run:
@@ -60,6 +61,10 @@ jobs:
6061
create-args: >-
6162
python=${{ matrix.python }}
6263
64+
- name: Install additional packages as needed
65+
run: |
66+
micromamba install -y --file etc/environment-tests.yml --freeze-installed
67+
6368
- name: Run pytest for CPU stuff
6469
run: |
6570
echo "print('Loading sitecustomize.py...')
@@ -82,6 +87,77 @@ jobs:
8287
data_3.10
8388
coverage_${{ matrix.env }}_3.10.dat
8489
90+
project_cpu_tests_linux:
91+
runs-on: ubuntu-latest
92+
93+
strategy:
94+
fail-fast: false
95+
matrix:
96+
env:
97+
- AllenCahn_Bayreuth
98+
- AsympConv
99+
- DAE
100+
- FastWaveSlowWave
101+
# - GPU
102+
- Hamiltonian
103+
- matrixPFASST
104+
- parallelSDC
105+
- parallelSDC_reloaded
106+
- PinTSimE
107+
- RDC
108+
- Resilience
109+
- SDC_showdown
110+
- Second_orderSDC
111+
- soft_failure
112+
- TOMS
113+
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
114+
exclude:
115+
- env: parallelSDC
116+
python: '3.11'
117+
- env: parallelSDC
118+
python: '3.12'
119+
120+
defaults:
121+
run:
122+
shell: bash -l {0}
123+
124+
steps:
125+
- name: Checkout
126+
uses: actions/checkout@v3
127+
128+
- name: Install Conda environment with Micromamba
129+
uses: mamba-org/setup-micromamba@v1
130+
with:
131+
environment-file: "pySDC/projects/${{ matrix.env }}/environment.yml"
132+
create-args: >-
133+
python=${{ matrix.python }}
134+
135+
- name: Install additional packages as needed
136+
run: |
137+
micromamba install -y --file etc/environment-tests.yml --freeze-installed
138+
139+
- name: Run pytest for CPU stuff
140+
run: |
141+
echo "print('Loading sitecustomize.py...')
142+
import coverage
143+
coverage.process_startup() " > sitecustomize.py
144+
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests
145+
146+
- name: Make coverage report
147+
run: |
148+
mv data data_${{ matrix.python }}
149+
coverage combine
150+
mv .coverage coverage_${{ matrix.env }}_${{ matrix.python }}.dat
151+
152+
- name: Uploading artifacts
153+
uses: actions/upload-artifact@v3
154+
if: matrix.python == '3.10'
155+
with:
156+
name: cpu-test-artifacts
157+
path: |
158+
data_3.10
159+
coverage_${{ matrix.env }}_3.10.dat
160+
85161
user_libpressio_tests:
86162
runs-on: ubuntu-latest
87163

@@ -108,7 +184,7 @@ jobs:
108184
source /opt/spack/share/spack/setup-env.sh
109185
spack load libpressio
110186
111-
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m libpressio
187+
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/compression/tests -m libpressio
112188
113189
- name: Make coverage report
114190
run: |
@@ -156,7 +232,7 @@ jobs:
156232
echo "print('Loading sitecustomize.py...')
157233
import coverage
158234
coverage.process_startup() " > sitecustomize.py
159-
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m monodomain
235+
coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/Monodomain/tests -m monodomain
160236
161237
- name: Make coverage report
162238
run: |
@@ -215,6 +291,7 @@ jobs:
215291
needs:
216292
- lint
217293
- user_cpu_tests_linux
294+
- project_cpu_tests_linux
218295
- user_libpressio_tests
219296
- user_monodomain_tests_linux
220297
# - wait_for_gitlab
@@ -230,7 +307,7 @@ jobs:
230307
- name: Install Conda environment with Micromamba
231308
uses: mamba-org/setup-micromamba@v1
232309
with:
233-
environment-file: "etc/environment-base.yml"
310+
environment-file: "etc/environment-postprocess.yml"
234311

235312
- name: Downloading artifacts
236313
uses: actions/download-artifact@v3

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions

docs/contrib/05_documenting_code.md

Lines changed: 1 addition & 1 deletion

docs/contrib/06_new_project.md

Lines changed: 57 additions & 0 deletions

etc/environment-base.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,3 @@ dependencies:
99
- sympy>=1.0
1010
- numba>=0.35
1111
- dill>=0.2.6
12-
- pytest
13-
- pytest-benchmark
14-
- pytest-timeout
15-
- pytest-order
16-
- coverage[toml]
17-
- sphinx

etc/environment-cupy.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@ dependencies:
77
- scipy>=0.17.1
88
- matplotlib>=3.0
99
- dill>=0.2.6
10-
- pytest
11-
- pytest-cov
12-
- pytest-timeout
13-
- pytest-order
1410
- cupy

etc/environment-fenics.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,3 @@ dependencies:
99
- dill>=0.2.6
1010
- fenics>=2019.1.0
1111
- mpi4py<=3.1.4
12-
- pytest
13-
- pytest-cov
14-
- pytest-timeout
15-
- pytest-order

etc/environment-mpi4py.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ channels:
55
dependencies:
66
- numpy>=1.15.4
77
- scipy>=0.17.1
8-
- matplotlib>=3.0,<=3.5.3
8+
- matplotlib>=3.0
99
- dill>=0.2.6
1010
- mpich
1111
- mpi4py-fft>=2.0.2
1212
- mpi4py>=3.0.0
13-
- pytest
14-
- pytest-cov
15-
- pytest-timeout

etc/environment-petsc.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,3 @@ dependencies:
1010
- mpich
1111
- petsc4py<3.20
1212
- mpi4py>=3.0.0
13-
- pytest
14-
- pytest-cov
15-
- pytest-timeout
16-
- pytest-order

etc/environment-postprocess.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: pySDC
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- coverage[toml]
7+
- sphinx
8+
- numpy
9+
- scipy
10+
- matplotlib
11+
- dill
12+
- numba

0 commit comments

Comments
 (0)