Repository navigation
116 lines (94 loc) · 2.82 KB
/
Copy pathtesting.yml
File metadata and controls
116 lines (94 loc) · 2.82 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# This workflow installs SymPDE and runs its tests with supported Python versions.
# It follows the testing layout used by Psydac while omitting Psydac-specific
# MPI, HDF5, PETSc, and example jobs.
name: Unit tests
on:
push:
branches: [ master ]
paths:
- 'sympde/**'
- 'pyproject.toml'
- '.github/workflows/testing.yml'
pull_request:
branches: [ master ]
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ]
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
pyproject.toml
- name: Upgrade pip, setuptools, and wheel
run: |
pip install --upgrade pip setuptools wheel
- name: Install project
run: |
pip install .[test]
pip freeze
- name: Initialize test directory
run: |
mkdir scratch
- name: Run coverage tests on macOS
if: runner.os == 'macOS'
working-directory: ./scratch
run: >-
pytest -n auto
--cov sympde --cov-report term-missing --cov-report xml
--pyargs sympde -ra
- name: Run tests on Ubuntu
if: runner.os == 'Linux'
working-directory: ./scratch
run: pytest -n auto --pyargs sympde -ra
- name: Upload coverage report
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ matrix.os }}-python-${{ matrix.python-version }}
path: scratch/coverage.xml
- name: Print detailed coverage results on macOS
if: runner.os == 'macOS'
working-directory: ./scratch
run: |
coverage report --ignore-errors --show-missing --sort=cover
minimum-sympy:
name: Ubuntu / Python 3.11 / SymPy 1.12
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
pyproject.toml
- name: Upgrade pip, setuptools, and wheel
run: |
pip install --upgrade pip setuptools wheel
- name: Install project with minimum SymPy
run: |
pip install .[test] 'sympy == 1.12'
pip freeze
- name: Initialize test directory
run: |
mkdir scratch
- name: Run tests
working-directory: ./scratch
run: pytest -n auto --pyargs sympde -ra