-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (55 loc) · 2.07 KB
/
test_workflow.yml
File metadata and controls
70 lines (55 loc) · 2.07 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Test
on:
workflow_call:
inputs:
dolfinx_tag:
required: true
type: string
jobs:
test-code:
runs-on: ubuntu-24.04
# The container tag is now dynamic based on the input passed by the caller
container: ghcr.io/fenics/dolfinx/dolfinx:${{ inputs.dolfinx_tag }}
steps:
- uses: actions/checkout@v6
- name: Update pip
run: python3 -m pip install --upgrade pip
- name: Install build requirements
run: python3 -m pip install -r build-requirements.txt
# Note: We assume the caller workflow has already uploaded these artifacts
- name: Download legacy mpich data
uses: actions/download-artifact@v8
with:
name: legacy_mpich
path: ./legacy
- name: Download legacy checkpoint mpich data
uses: actions/download-artifact@v8
with:
name: legacy_checkpoint_mpich
path: ./legacy_checkpoint
- name: Install package
run: |
HDF5_MPI=ON HDF5_PKGCONFIG_NAME="hdf5" python3 -m pip install h5py --no-build-isolation --no-binary=h5py
python3 -m pip install .[test]
- name: Show adios2 version
run: python3 -c "import adios2; print(adios2.__version__)"
- name: Show h5py version
run: python3 -c "import h5py; print(h5py.__version__)"
- name: Show hdf5 version
run: python3 -c "import h5py; print(h5py.version.hdf5_version)"
- name: Run tests
run: coverage run --rcfile=.coveragerc -m pytest -xvs ./tests/
- name: Run tests in parallel
run: mpirun -n 4 coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/
- name: Combine coverage reports
run: |
coverage combine
coverage report -m
coverage html
# Use the tag in the artifact name so parallel runs don't overwrite each other
- name: Upload coverage report
uses: actions/upload-artifact@v7
with:
name: code-coverage-report-${{ inputs.dolfinx_tag }}
path: htmlcov
if-no-files-found: error