18
18
branches : [ main ]
19
19
20
20
jobs :
21
- devcheck :
22
- runs-on : ubuntu-latest
23
- strategy :
24
- matrix :
25
- python-version : [3.7, 3.9] # Check oldest and newest versions
26
- pip-flags : ['', '--editable']
27
- pydra :
28
- - ' pydra'
29
- - ' --editable git+https://github.com/nipype/pydra.git#egg=pydra'
30
-
31
- steps :
32
- - uses : actions/checkout@v2
33
- - name : Set up Python ${{ matrix.python-version }}
34
- uses : actions/setup-python@v2
35
- with :
36
- python-version : ${{ matrix.python-version }}
37
- - name : Install build dependencies
38
- run : |
39
- python -m pip install --upgrade pip
40
- - name : Install Pydra
41
- run : |
42
- pip install ${{ matrix.pydra }}
43
- python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
44
- - name : Install task package
45
- run : |
46
- pip install ${{ matrix.pip-flags }} ".[dev]"
47
- python -c "import pydra.tasks.$SUBPACKAGE as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
48
- python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
49
21
50
22
test :
51
23
runs-on : ubuntu-latest
52
24
strategy :
53
25
matrix :
54
- python-version : [3.7 , 3.8 , 3.9 ]
26
+ python-version : [3.11 , 3.12 , 3.13 ]
55
27
56
28
steps :
57
29
- uses : actions/checkout@v2
@@ -65,41 +37,46 @@ jobs:
65
37
- name : Install task package
66
38
run : |
67
39
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__}')"
40
+ - name : Install development Pydra and fileformats-medimage
41
+ run : |
42
+ pip uninstall pydra fileformats-medimage -y
43
+ pip install --no-deps git+https://github.com/nipype/pydra.git@new-syntax
44
+ pip install --no-deps git+https://github.com/arcanaframework/fileformats-medimage.git@pydra-syntax-changes
70
45
- name : Test with pytest
71
46
run : |
72
- pytest -sv --doctest-modules pydra/tasks/$SUBPACKAGE \
73
- --cov pydra.tasks.$SUBPACKAGE --cov-report xml
47
+ pytest -sv --cov pydra.tasks.$SUBPACKAGE --cov-report xml
74
48
- uses : codecov/codecov-action@v1
75
49
if : ${{ always() }}
76
50
77
-
78
51
deploy :
79
- needs : [devcheck, test]
52
+ needs : [test]
80
53
runs-on : ubuntu-latest
81
54
strategy :
82
55
matrix :
83
56
python-version : [3.9]
84
57
steps :
85
- - uses : actions/checkout@v2
58
+ - uses : actions/checkout@v3
86
59
with :
87
60
submodules : recursive
88
61
fetch-depth : 0
89
- - name : Set up Python ${{ matrix.python-version }}
90
- uses : actions/setup-python@v2
62
+ - name : Unset header
63
+ # checkout@v2 adds a header that makes branch protection report errors
64
+ # because the Github action bot is not a collaborator on the repo
65
+ run : git config --local --unset http.https://github.com/.extraheader
66
+ - name : Set up Python
67
+ uses : actions/setup-python@v3
91
68
with :
92
- python-version : ${{ matrix.python-version }}
69
+ python-version : ' 3.12 '
93
70
- name : Install build tools
94
- run : python -m pip install --upgrade pip setuptools wheel twine
71
+ run : python3 -m pip install --break-system-packages build twine
95
72
- name : Build source and wheel distributions
96
- run : python setup.py sdist bdist_wheel
73
+ run : python3 -m build .
97
74
- name : Check distributions
98
75
run : twine check dist/*
99
- - uses : actions/upload-artifact@v2
76
+ - uses : actions/upload-artifact@v4
100
77
with :
101
- name : distributions
102
- path : dist/
78
+ name : built
79
+ path : /dist
103
80
# Deploy on tags if PYPI_API_TOKEN is defined in the repository secrets.
104
81
# Secrets are not accessible in the if: condition [0], so set an output variable [1]
105
82
# [0] https://github.community/t/16928
0 commit comments