-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (82 loc) · 2.39 KB
/
Copy pathtest.yml
File metadata and controls
95 lines (82 loc) · 2.39 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
name: Tests
on:
workflow_call:
push:
branches: ["master", "main"]
pull_request:
branches: ["master", "main"]
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files
test:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
numpy-version: ["1.26.4", "2.2.6", "2.3.5"]
exclude:
- python-version: "3.11"
numpy-version: "2.2.6"
- python-version: "3.11"
numpy-version: "2.3.5"
- python-version: "3.12"
numpy-version: "2.2.6"
- python-version: "3.12"
numpy-version: "2.3.5"
- python-version: "3.13"
numpy-version: "1.26.4"
- python-version: "3.14"
numpy-version: "1.26.4"
- python-version: '3.13'
jax-version: "0.4.20"
- python-version: '3.14'
jax-version: "0.4.20"
- os: windows-latest
python-version: '3.14'
- jax-version: "0.4.20"
numpy-version: "2.2.6"
- jax-version: "0.4.20"
numpy-version: "2.3.5"
jax-version:
- 0.4.20
- latest
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ "${{ matrix.jax-version }}" != "latest" ]; then
pip install -e ".[dev]" "numpy==${{ matrix.numpy-version }}" "jax==${{ matrix.jax-version }}" "jaxlib==${{ matrix.jax-version }}"
else
pip install -e ".[dev]" "numpy==${{ matrix.numpy-version }}"
fi
shell: bash
- name: Run tests
run: |
pytest -v --cov=diff_epr --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}