Skip to content

Commit ed9411a

Browse files
committed
CI: Separate install checks from tests
1 parent 89e8d85 commit ed9411a

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
# Note that editable installs of Pydra and the task package is useful to ensure that the
5-
# template describes namespace packages that can be used in various development environments.
6-
# Packages that use it probably do not want to continue testing with editable installations,
7-
# quadrupling their test load.
8-
94
# For deployment, it will be necessary to create a PyPI API token and store it as a secret
105
# https://docs.github.com/en/actions/reference/encrypted-secrets
116

@@ -23,11 +18,11 @@ on:
2318
branches: [ main ]
2419

2520
jobs:
26-
test:
21+
devcheck:
2722
runs-on: ubuntu-latest
2823
strategy:
2924
matrix:
30-
python-version: [3.7, 3.8, 3.9]
25+
python-version: [3.7, 3.9] # Check oldest and newest versions
3126
pip-flags: ['', '--editable']
3227
pydra:
3328
- 'pydra'
@@ -51,12 +46,33 @@ jobs:
5146
pip install ${{ matrix.pip-flags }} ".[dev]"
5247
python -c "import pydra.tasks.$SUBPACKAGE as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
5348
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
49+
50+
test:
51+
runs-on: ubuntu-latest
52+
strategy:
53+
matrix:
54+
python-version: [3.7, 3.8, 3.9]
55+
56+
steps:
57+
- uses: actions/checkout@v2
58+
- name: Set up Python ${{ matrix.python-version }}
59+
uses: actions/setup-python@v2
60+
with:
61+
python-version: ${{ matrix.python-version }}
62+
- name: Install build dependencies
63+
run: |
64+
python -m pip install --upgrade pip
65+
- name: Install task package
66+
run: |
67+
pip install ".[test]"
68+
python -c "import pydra.tasks.$SUBPACKAGE as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
69+
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
5470
- name: Test with pytest
5571
run: |
5672
pytest -sv --doctest-modules pydra/tasks/$SUBPACKAGE
5773
5874
deploy:
59-
needs: test
75+
needs: [devcheck, test]
6076
runs-on: ubuntu-latest
6177
strategy:
6278
matrix:

0 commit comments

Comments
 (0)