Skip to content

Commit e2e56d4

Browse files
authored
Merge pull request #69 from bids-standard/ci/prerelease
chore(ci): Split pre-release tests into cron job
2 parents 3b3cc2d + 1f1081f commit e2e56d4

2 files changed

Lines changed: 99 additions & 9 deletions

File tree

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,11 @@ jobs:
4949
matrix:
5050
os: [ubuntu-latest, macos-latest, windows-latest]
5151
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
52-
dependencies: ['full', 'pre']
52+
dependencies: ['full']
5353
include:
5454
- os: ubuntu-latest
5555
python-version: '3.10'
5656
dependencies: 'min'
57-
exclude:
58-
# Skip pre-release tests for Pythons out of SPEC0
59-
- python-version: '3.10'
60-
dependencies: pre
61-
- python-version: '3.11'
62-
dependencies: pre
6357

6458
env:
6559
DEPENDS: ${{ matrix.dependencies }}
@@ -93,8 +87,11 @@ jobs:
9387
uv tool install --with=tox-uv --with=tox-gh-actions tox
9488
- name: Show tox config
9589
run: tox c
96-
- name: Run tox
97-
run: tox -v --exit-and-dump-after 1200
90+
- name: Setup test suite
91+
run: tox run -vv --notest
92+
- name: Run test suite
93+
id: pre
94+
run: tox -v --skip-pkg-install --exit-and-dump-after 1200
9895
- uses: codecov/codecov-action@v5
9996
if: ${{ always() }}
10097
with:

.github/workflows/prerelease.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Prerelease tests
2+
3+
on:
4+
push:
5+
branches:
6+
- ci/prerelease
7+
schedule:
8+
- cron: '0 0 * * 1'
9+
# Allow job to be triggered manually from GitHub interface
10+
workflow_dispatch:
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
# Force tox and pytest to use color
17+
env:
18+
FORCE_COLOR: true
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
permissions:
25+
contents: read
26+
27+
jobs:
28+
test:
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
os: [ubuntu-latest, macos-latest, windows-latest]
34+
python-version: ['3.12', '3.13', '3.14']
35+
36+
env:
37+
DEPENDS: pre
38+
39+
steps:
40+
- uses: actions/checkout@v6
41+
with:
42+
submodules: true
43+
lfs: true
44+
45+
- name: Set git name/email
46+
run: |
47+
git config --global user.email "bids.maintenance@gmail.com"
48+
git config --global user.name "bids-maintenance"
49+
50+
- name: Install the latest version of uv
51+
uses: astral-sh/setup-uv@v7
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
55+
- name: Install git-annex
56+
run: uv tool install git-annex
57+
58+
- name: Show software versions
59+
run: |
60+
python -c "import sys; print(sys.version)"
61+
git annex version
62+
63+
- name: Install tox
64+
run: |
65+
uv tool install --with=tox-uv --with=tox-gh-actions tox
66+
- name: Show tox config
67+
run: tox c
68+
- name: Setup test suite
69+
run: tox run -vv --notest
70+
- name: Run test suite
71+
id: pre
72+
run: tox -v --skip-pkg-install --exit-and-dump-after 1200
73+
- uses: codecov/codecov-action@v5
74+
if: ${{ always() }}
75+
with:
76+
token: ${{ secrets.CODECOV_TOKEN }}
77+
- name: Create issue
78+
# Workflows triggered by schedule only notify the workflow creator
79+
# So let's open an issue to make sure this is visible to all
80+
if: ${{ steps.pre.outcome != 'success' }}
81+
uses: JasonEtco/create-an-issue@v2.9.2
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
run_id: ${{ github.run_id }}
85+
repository: ${{ github.repository }}
86+
workflow_name: PRE-RELEASE TESTS
87+
with:
88+
filename: .github/workflow_failure.md
89+
update_existing: true
90+
search_existing: open
91+
- name: Return failure
92+
if: ${{ steps.pre.outcome != 'success' }}
93+
run: exit 1

0 commit comments

Comments
 (0)