@@ -16,29 +16,30 @@ jobs:
16
16
runs-on : ubuntu-latest
17
17
strategy :
18
18
matrix :
19
- python-version : [3.7, 3.8, 3.9 ]
19
+ python-version : ['3.8', '3.9', '3.10', '3.11' ]
20
20
21
21
steps :
22
22
- name : Set up Python ${{ matrix.python-version }}
23
- uses : actions/setup-python@v2
23
+ uses : actions/setup-python@v4
24
24
with :
25
25
python-version : ${{ matrix.python-version }}
26
- - uses : actions/checkout@v2
26
+ - uses : actions/checkout@v3
27
27
with :
28
28
fetch-depth : 0
29
- - name : Build in confined, updated environment and interpolate version
29
+ - name : Build package
30
30
run : |
31
- python -m venv /tmp/buildenv
32
- source /tmp/buildenv/bin/activate
33
- python -m pip install -U setuptools pip wheel twine docutils
34
- python setup.py sdist bdist_wheel
35
- python -m twine check dist/nitransforms*
31
+ pipx run build
32
+ - name : Determine expected version
33
+ run : |
34
+ python -m venv /tmp/getversion
35
+ source /tmp/getversion/bin/activate
36
+ python -m pip install setuptools_scm
36
37
37
38
# Interpolate version
38
39
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
39
40
TAG=${GITHUB_REF##*/}
40
41
fi
41
- THISVERSION=$( python setup.py --version )
42
+ THISVERSION=$( python -m setuptools_scm )
42
43
THISVERSION=${TAG:-$THISVERSION}
43
44
echo "Expected VERSION: \"${THISVERSION}\""
44
45
echo "THISVERSION=${THISVERSION}" >> ${GITHUB_ENV}
47
48
run : |
48
49
python -m venv /tmp/install_sdist
49
50
source /tmp/install_sdist/bin/activate
50
- python -m pip install --upgrade pip wheel
51
+ python -m pip install --upgrade pip
51
52
python -m pip install dist/nitransforms*.tar.gz
52
53
INSTALLED_VERSION=$(python -c 'import nitransforms; print(nitransforms.__version__, end="")')
53
54
echo "VERSION: \"${THISVERSION}\""
58
59
run : |
59
60
python -m venv /tmp/install_wheel
60
61
source /tmp/install_wheel/bin/activate
61
- python -m pip install --upgrade pip wheel
62
+ python -m pip install --upgrade pip
62
63
python -m pip install dist/nitransforms*.whl
63
64
INSTALLED_VERSION=$(python -c 'import nitransforms; print(nitransforms.__version__, end="")')
64
65
echo "INSTALLED: \"${INSTALLED_VERSION}\""
89
90
if : " !contains(github.event.head_commit.message, '[skip ci]')"
90
91
runs-on : ubuntu-latest
91
92
steps :
92
- - uses : actions/checkout@v2
93
+ - uses : actions/checkout@v3
93
94
- name : Set up Python 3.7
94
- uses : actions/setup-python@v1
95
+ uses : actions/setup-python@v4
95
96
with :
96
97
python-version : 3.7
97
- - run : pip install flake8
98
- - run : flake8 nitransforms/
98
+ - run : pipx run flake8 nitransforms
0 commit comments