-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (66 loc) · 2.02 KB
/
ci.yaml
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
name: CI
on:
# run every Sunday at 3:33 UTC
schedule:
- cron: "33 3 * * 0"
push:
branches:
- "main"
pull_request:
branches:
- "main"
concurrency:
group: "${{ github.ref }}-${{ github.head_ref }}"
cancel-in-progress: true
jobs:
test:
name: Test ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macOS-latest
python-version: "3.9"
- os: macOS-latest
python-version: "3.10"
- os: macOS-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.9"
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version ${{ matrix.python-version }}
run: python -c "import sys; print(sys.version)"
- name: Install pytest, pytest plugins
run: |
python -m pip install wheel
python -m pip install pytest pytest-cov pytest-pep8
- name: Install main dependencies
run: |
python -m pip install six
python -m pip install --only-binary=numpy numpy
python -m pip install --only-binary=scipy scipy
- name: Install package
run: |
python -m pip install .
- name: Run tests
run: |
pytest -v --cov=numkit --cov-report=xml --color=yes src/numkit/tests
- name: Codecov
uses: codecov/codecov-action@v3
with:
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false