forked from nilearn/nilearn
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (64 loc) · 2.15 KB
/
test_with_tox.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
name: test
on:
push:
branches:
- main
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Force to use color
env:
FORCE_COLOR: true
jobs:
test_and_coverage:
if: github.repository == 'nilearn/nilearn'
name: 'Test with ${{ matrix.py }} on ${{ matrix.os }}: ${{ matrix.description }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
description: [latest dependencies]
py: ['3.13', '3.12', '3.11', '3.10', '3.9']
os: [ubuntu-latest, macos-latest, windows-latest]
env: [test_plotting]
include:
- description: pre-release dependencies
py: '3.13'
os: ubuntu-latest
env: test_pre
- description: oldest dependencies - no plotting
py: '3.9'
os: ubuntu-latest
env: test_min
- description: oldest dependencies - no plotly
py: '3.9'
os: ubuntu-latest
env: test_plot_min
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
allow-prereleases: true
- name: Install tox
run: python -m pip install tox
- name: Show tox config
run: tox c
- name: Run test suite
run: tox run -e ${{ matrix.env }} -- nilearn
- name: Upload test report
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_${{ matrix.py }}_${{ matrix.description }}_report.html
path: report.html
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v5
with:
flags: ${{ matrix.os }}_${{ matrix.py }}_${{ matrix.env }}
if: success()