@@ -16,29 +16,30 @@ jobs:
1616 runs-on : ubuntu-latest
1717 strategy :
1818 matrix :
19- python-version : [3.7, 3.8, 3.9 ]
19+ python-version : ['3.8', '3.9', '3.10', '3.11' ]
2020
2121 steps :
2222 - name : Set up Python ${{ matrix.python-version }}
23- uses : actions/setup-python@v2
23+ uses : actions/setup-python@v4
2424 with :
2525 python-version : ${{ matrix.python-version }}
26- - uses : actions/checkout@v2
26+ - uses : actions/checkout@v3
2727 with :
2828 fetch-depth : 0
29- - name : Build in confined, updated environment and interpolate version
29+ - name : Build package
3030 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
3637
3738 # Interpolate version
3839 if [[ "$GITHUB_REF" == refs/tags/* ]]; then
3940 TAG=${GITHUB_REF##*/}
4041 fi
41- THISVERSION=$( python setup.py --version )
42+ THISVERSION=$( python -m setuptools_scm )
4243 THISVERSION=${TAG:-$THISVERSION}
4344 echo "Expected VERSION: \"${THISVERSION}\""
4445 echo "THISVERSION=${THISVERSION}" >> ${GITHUB_ENV}
4748 run : |
4849 python -m venv /tmp/install_sdist
4950 source /tmp/install_sdist/bin/activate
50- python -m pip install --upgrade pip wheel
51+ python -m pip install --upgrade pip
5152 python -m pip install dist/nitransforms*.tar.gz
5253 INSTALLED_VERSION=$(python -c 'import nitransforms; print(nitransforms.__version__, end="")')
5354 echo "VERSION: \"${THISVERSION}\""
5859 run : |
5960 python -m venv /tmp/install_wheel
6061 source /tmp/install_wheel/bin/activate
61- python -m pip install --upgrade pip wheel
62+ python -m pip install --upgrade pip
6263 python -m pip install dist/nitransforms*.whl
6364 INSTALLED_VERSION=$(python -c 'import nitransforms; print(nitransforms.__version__, end="")')
6465 echo "INSTALLED: \"${INSTALLED_VERSION}\""
8990 if : " !contains(github.event.head_commit.message, '[skip ci]')"
9091 runs-on : ubuntu-latest
9192 steps :
92- - uses : actions/checkout@v2
93+ - uses : actions/checkout@v3
9394 - name : Set up Python 3.7
94- uses : actions/setup-python@v1
95+ uses : actions/setup-python@v4
9596 with :
9697 python-version : 3.7
97- - run : pip install flake8
98- - run : flake8 nitransforms/
98+ - run : pipx run flake8 nitransforms
0 commit comments