Skip to content

Commit 4f3385c

Browse files
authored
Merge pull request #1188 from bids-standard/ci/pre-release
chore(ci): Skip pre-release checks on unlabeled PRs
2 parents 40065d1 + 9fd37ab commit 4f3385c

File tree

4 files changed

+78
-17
lines changed

4 files changed

+78
-17
lines changed

.github/workflows/build-test-deploy.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
# This file tests the claimed support range of PyBIDS including
2-
#
3-
# * Operating systems: Linux, OSX
1+
name: Python
42

53
on:
64
push:
75
branches:
8-
- master
6+
- main
97
- maint/*
10-
- test-pypi-uploads
118
tags:
129
- '*'
1310
pull_request: {}
@@ -49,13 +46,14 @@ jobs:
4946

5047
test:
5148
# Check each OS, all supported Python, minimum versions and latest releases
49+
name: Test
5250
runs-on: ${{ matrix.os }}
5351
needs: [build]
5452
strategy:
5553
matrix:
5654
os: ['ubuntu-latest', 'macos-latest']
5755
python-version: ['3.10', '3.11', '3.12', '3.13']
58-
dependencies: ['full', 'pre']
56+
dependencies: ['full']
5957
source: ['repo']
6058
include:
6159
- os: ubuntu-latest
@@ -66,15 +64,7 @@ jobs:
6664
python-version: '3'
6765
dependencies: full
6866
source: 'sdist'
69-
exclude:
70-
# Drop pre tests for SPEC-0-unsupported Python versions
71-
# See https://scientific-python.org/specs/spec-0000/
72-
- python-version: '3.10'
73-
dependencies: pre
74-
- python-version: '3.11'
75-
dependencies: pre
7667
fail-fast: false
77-
continue-on-error: ${{ matrix.dependencies == 'pre' }}
7868

7969
env:
8070
DEPENDS: ${{ matrix.dependencies }}

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Codespell
33

44
on:
55
push:
6-
branches: [master]
6+
branches: [main]
77
pull_request:
8-
branches: [master]
8+
branches: [main]
99

1010
jobs:
1111
codespell:

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Documentation
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
- maint/*
88
- rel/*
99
- docs/*

.github/workflows/prerelease.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Pre-release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
# 8am EST / 9am EDT Mondays
12+
- cron: '0 13 * * 1'
13+
# Allow job to be triggered manually from GitHub interface
14+
workflow_dispatch:
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
# Force tox and pytest to use color
21+
env:
22+
FORCE_COLOR: true
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
permissions:
29+
contents: read
30+
31+
jobs:
32+
test:
33+
name: Test
34+
if: |
35+
github.event_name != 'pull_request'
36+
|| contains(github.event.pull_request.labels.*.name, 'prerelease')
37+
runs-on: ${{ matrix.os }}
38+
strategy:
39+
matrix:
40+
os: ['ubuntu-latest', 'macos-latest']
41+
python-version: ['3.12', '3.13']
42+
fail-fast: false
43+
44+
permissions:
45+
actions: write
46+
47+
env:
48+
DEPENDS: pre
49+
50+
steps:
51+
- uses: actions/checkout@v5
52+
with:
53+
submodules: recursive
54+
fetch-depth: 0
55+
- name: Install the latest version of uv
56+
uses: astral-sh/setup-uv@v7
57+
with:
58+
python-version: ${{ matrix.python-version }}
59+
- name: Display Python version
60+
run: python -c "import sys; print(sys.version)"
61+
- name: Install tox
62+
run: |
63+
uv tool install tox --with=tox-uv --with=tox-gh-actions
64+
- name: Show tox config
65+
run: tox c
66+
- name: Run tox
67+
run: tox -v --exit-and-dump-after 1200
68+
- uses: codecov/codecov-action@v5
69+
if: ${{ always() }}
70+
with:
71+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)