11name : CI
22
3+ permissions :
4+ contents : read
5+ pull-requests : write
6+
37on :
48 push :
5- branches : ["main"]
9+ branches : [ "main" ]
610 pull_request :
7- branches : ["main"]
11+ branches : [ "main" ]
812
913env :
1014 UV_FROZEN : true
15+ COVERAGE_PYTHON : " 3.12"
1116
1217jobs :
1318 format :
1419 runs-on : ubuntu-latest
1520 steps :
16- - uses : actions/checkout@v4
21+ - uses : actions/checkout@v6
1722 with :
1823 submodules : " true"
19- - name : Install uv
20- uses : astral-sh/setup-uv@v5
21- with :
22- pyproject-file : pyproject.toml
23- - name : Install the project
24- run : uv sync --all-extras
24+ - uses : astral-sh/setup-uv@v8.1.0
25+ - run : uv sync --all-extras
2526 - name : Check quality
2627 run : |
2728 uv run ruff check bids2table tests
@@ -32,26 +33,45 @@ jobs:
3233 needs : format
3334 strategy :
3435 matrix :
35- python-version : ["3.11", "3.12", "3.13"]
36+ python-version : [ "3.11", "3.12", "3.13", "3.14" ]
3637 steps :
37- - uses : actions/checkout@v4
38+ - uses : actions/checkout@v6
3839 with :
3940 submodules : " true"
40- - name : Install uv with python version
41- uses : astral-sh/setup-uv@v6
41+ - uses : astral-sh/setup-uv@v8.1.0
4242 with :
4343 python-version : ${{ matrix.python-version }}
4444
4545 - name : Run tests without cloudpathlib
4646 run : |
47- uv run pytest tests
47+ uv run pytest \
48+ -m "not cloud" \
49+ --junitxml=pytest-cloudless.xml \
50+ --cov-report=xml:coverage.xml \
51+ --cov bids2table \
52+ tests
53+
4854 - name : Run tests with cloudpathlib
4955 run : |
50- uv run --all-extras pytest \
51- --junitxml=pytest.xml \
56+ uv run --extra cloud pytest \
57+ -m "cloud" \
58+ --junitxml=pytest-cloud.xml \
5259 --cov-report=xml:coverage.xml \
53- --cov=bids2table tests
54- - name : Upload coverage to Codecov
55- uses : codecov/codecov-action@v4
60+ --cov=bids2table \
61+ --cov-append \
62+ tests
63+
64+ - name : Merge JUnit XML reports
65+ run : |
66+ uvx junitparser merge \
67+ pytest-cloudless.xml \
68+ pytest-cloud.xml \
69+ pytest.xml
70+
71+ - name : Pytest coverage comment
72+ if : github.event_name == 'pull_request' && matrix.python-version ==
73+ env.COVERAGE_PYTHON
74+ uses : MishaKav/pytest-coverage-comment@v1
5675 with :
57- token : ${{ secrets.CODECOV_TOKEN }}
76+ pytest-xml-coverage-path : ./coverage.xml
77+ junitxml-path : ./pytest.xml
0 commit comments