-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (82 loc) · 2.15 KB
/
test.yaml
File metadata and controls
92 lines (82 loc) · 2.15 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
name: CI
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
unit:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
- run: uv sync
- name: Run non-ubuntu quick tests
if: matrix.os != 'ubuntu-latest'
shell: bash
run: >
uv run pytest \
-m "unit" \
--junitxml=pytest.xml \
--cov=src \
--log-level=DEBUG \
--verbose tests
- name: Run ubuntu quick tests
if: matrix.os == 'ubuntu-latest'
shell: bash
run: >
uv run pytest \
-m "not slow and not full_pipeline" \
--junitxml=pytest.xml \
--cov=src \
--cov-report=xml \
--log-level=DEBUG \
--verbose tests
- name: Pytest coverage comment
if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request'
uses: MishaKav/pytest-coverage-comment@v1
with:
pytest-xml-coverage-path: ./coverage.xml
junitxml-path: ./pytest.xml
codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
- run: uv sync
- name: Check generated files are up-to-date
run: |
uv run scripts/generate_bids_tools.py
git diff --exit-code || (echo "Generated files are out of date. Run: uv run scripts/generate_bids_tools.py" && exit 1)
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
- run: uv sync --only-dev
- name: Ruff format
run: uv run ruff format --check
- name: Ruff check
run: uv run ruff check
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
- run: uv sync
- run: uv run mypy .
deptry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
- run: uv sync
- run: uv run deptry ./src