-
Notifications
You must be signed in to change notification settings - Fork 29
150 lines (124 loc) · 3.68 KB
/
Copy pathpythonpackage.yml
File metadata and controls
150 lines (124 loc) · 3.68 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: NIXPy tests and linting
on:
# Run one build a month at 01:00
# schedule:
# - cron: '0 1 1 * *'
workflow_dispatch:
push:
branches:
- master
- dev
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Run install
run: |
python -m pip install --upgrade pip
python -m pip install setuptools
python -m pip install ".[dev]"
- name: Lint with Pylint
run: |
python -m pip install pylint
# Make sure it uses the project rcfile
pylint --rcfile=.pylintrc nixio
- name: Test with pytest
run: |
python -m pip install pytest scipy pillow matplotlib
# pytest will skip cross-compatibility tests since NIX isn't installed
pytest
run-conda-test:
needs: [build]
name: Running tests using miniconda
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.13']
steps:
- uses: actions/checkout@v6
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: deptest-${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
channels: conda-forge
- name: Install setuptools
run: |
conda install -c conda-forge setuptools
- name: Show conda details
run: |
conda info
conda list
which python
conda --version
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
python -m pip install pytest scipy pillow matplotlib setuptools h5py
- name: Run tests
run: |
pytest
run-coveralls:
needs: [build]
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v6
- name: Setup Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
python -m pip install setuptools pytest coveralls scipy pillow matplotlib h5py
- name: Create coverage
run: |
coverage run --source=nixio -m pytest nixio/test/
- name: Submit to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
run-codecov:
needs: [build]
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v6
- name: Setup Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
python -m pip install setuptools pytest pytest-cov scipy pillow matplotlib
- name: Create coverage
run: |
pytest --cov=./ --cov-report=xml
- uses: codecov/codecov-action@v5
with:
name: Submit Codecov coverage
files: ./coverage.xml
verbose: true # optional (default = false)