Repository navigation
69 lines (62 loc) · 2.41 KB
/
Copy pathtests.yml
File metadata and controls
69 lines (62 loc) · 2.41 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
name: tests
on:
# Pull requests, including ones from forks: `push` alone never fires for a
# contributor's fork, so their PR would sit with no checks at all. Pushes to
# main still run so the badge reflects main. A branch pushed without a PR
# gets no CI; open a draft PR to get it.
pull_request:
push:
branches: [main]
workflow_dispatch:
# Nothing here writes to the repository. Said explicitly so it stays true
# even if the repository default is loosened again.
permissions:
contents: read
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# 3.9 reached end of life in October 2025; the floor is now 3.10
# (kept in sync with requires-python in pyproject.toml).
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
# The charts are an optional extra, so most of the matrix runs without
# matplotlib — that is the configuration nearly every user installs,
# and it proves the core stays importable without it. One entry pulls
# it in so `jupyddl/viz/` is actually executed rather than skipped.
extras: [dev]
include:
- os: ubuntu-latest
python-version: '3.12'
extras: dev,viz
name: test (${{ matrix.os }}, ${{ matrix.python-version }}, ${{ matrix.extras }})
env:
MPLBACKEND: Agg
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: ${{ matrix.python-version }}
- name: Install package (${{ matrix.extras }} extras)
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[${{ matrix.extras }}]"
- name: Lint with flake8
run: |
flake8 jupyddl tests tools --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 jupyddl tests tools --count --statistics
- name: Test with pytest
run: |
pytest --cov=jupyddl --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7
with:
name: codecov-umbrella