Skip to content

Commit b5a3674

Browse files
authored
chore(dev): Move to tox to simplify test/CI setup (#3326)
1 parent 70209ee commit b5a3674

File tree

12 files changed

+165
-270
lines changed

12 files changed

+165
-270
lines changed

.github/workflows/pre-release.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/stable.yml renamed to .github/workflows/test.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ defaults:
1616
run:
1717
shell: bash
1818

19+
# Force tox and pytest to use color
20+
env:
21+
FORCE_COLOR: true
22+
1923
concurrency:
2024
group: ${{ github.workflow }}-${{ github.ref }}
2125
cancel-in-progress: true
@@ -24,47 +28,49 @@ permissions:
2428
contents: read
2529

2630
jobs:
27-
stable:
31+
test:
2832
# Check each OS, all supported Python, minimum versions and latest releases
2933
runs-on: ${{ matrix.os }}
3034
strategy:
3135
matrix:
3236
os: ['ubuntu-latest']
3337
python-version: ['3.10', '3.11', '3.12']
34-
install: ['pip']
35-
check: ['tests']
36-
pip-flags: ['']
38+
dependencies: ['latest', 'pre']
39+
include:
40+
- os: ubuntu-latest
41+
python-version: '3.10'
42+
dependencies: 'min'
43+
3744
env:
38-
INSTALL_TYPE: ${{ matrix.install }}
39-
CHECK_TYPE: ${{ matrix.check }}
40-
EXTRA_PIP_FLAGS: ${{ matrix.pip-flags }}
41-
OS_TYPE: ${{ matrix.os }}
45+
DEPENDS: ${{ matrix.dependencies }}
4246

4347
steps:
4448
- uses: actions/checkout@v4
4549
with:
4650
submodules: recursive
4751
fetch-depth: 0
52+
- uses: actions/cache@v4
53+
with:
54+
path: ~/.cache/templateflow
55+
key: templateflow-v1
4856
- name: Install dependencies
49-
run: .maint/ci/install_dependencies.sh
57+
run: |
58+
sudo apt update
59+
sudo apt install -y --no-install-recommends graphviz
5060
- name: Set up Python ${{ matrix.python-version }}
5161
uses: actions/setup-python@v5
5262
with:
5363
python-version: ${{ matrix.python-version }}
5464
- name: Display Python version
5565
run: python -c "import sys; print(sys.version)"
56-
- name: Create virtual environment
57-
run: .maint/ci/create_venv.sh
58-
- name: Build archive
66+
- name: Install tox
5967
run: |
60-
source .maint/ci/build_archive.sh
61-
echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV
62-
- name: Install fMRIPrep
63-
run: .maint/ci/install.sh
64-
- name: Install extras
65-
run: .maint/ci/install_extras.sh
66-
- name: Run tests
67-
run: .maint/ci/check.sh
68+
python -m pip install --upgrade pip
69+
python -m pip install tox tox-gh-actions
70+
- name: Show tox config
71+
run: tox c
72+
- name: Run tox
73+
run: tox -v --exit-and-dump-after 1200
6874
- uses: codecov/codecov-action@v4
6975
with:
7076
file: coverage.xml

.maint/ci/activate.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

.maint/ci/build_archive.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

.maint/ci/check.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

.maint/ci/create_venv.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

.maint/ci/env.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

.maint/ci/install.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

.maint/ci/install_dependencies.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

.maint/ci/install_extras.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)