-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (54 loc) · 1.72 KB
/
ci_run_tests.yml
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
name: Automated Tests
on:
push:
branches:
- '**' # matches every branch
- '!gh-pages' # excludes gh-pages
pull_request:
branches:
- '**' # matches every branch
- '!gh-pages' # excludes gh-pages
permissions:
contents: read
jobs:
build:
# runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"] # "3.13"]
numpy-version: ["1.23", "1.25", "1.26", "2.0.0", "2.1.0"]
exclude:
# Old numpy version does not work properly with python > 3.11
- python-version: "3.12"
numpy-version: "1.23"
- python-version: "3.12"
numpy-version: "1.25"
- python-version: "3.13"
numpy-version: "1.23"
- python-version: "3.13"
numpy-version: "1.25"
- python-version: "3.13"
numpy-version: "1.26"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
python -m ensurepip --upgrade
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install numpy==${{ matrix.numpy-version }}
pip install flake8 pytest
if [ -f requirements_tests.txt ]; then pip install -r requirements_tests.txt; fi
- name: Build package
run: python -m build --wheel
- name: Install Package
run: pip install dist/*
- name: Run tests with pytest
run: pytest tests