@@ -14,9 +14,12 @@ concurrency:
1414 cancel-in-progress : true
1515
1616jobs :
17- package-check :
17+ package-check-python :
1818 runs-on : ubuntu-latest
1919 timeout-minutes : 10
20+ strategy :
21+ matrix :
22+ python-version : ["3.11", "3.12"]
2023 steps :
2124 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2225 with :
@@ -25,19 +28,16 @@ jobs:
2528
2629 - uses : actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2730 with :
28- python-version : " 3.12"
29-
30- - name : Install build tooling
31- uses : ./.github/actions/setup-hatch
31+ python-version : ${{ matrix.python-version }}
3232
3333 - name : Install test and distribution tooling
34- run : python -m pip install ".[test]" "twine>=4.0.0 "
34+ run : python -m pip install -e ".[dev, test]"
3535
3636 - name : Run unit tests
3737 run : python -m pytest -q tests/unit
3838
3939 - name : Build distributions
40- run : hatch build
40+ run : python -m build
4141
4242 - name : Validate distributions
4343 run : python -m twine check dist/*
@@ -47,12 +47,23 @@ jobs:
4747 python -m venv "$RUNNER_TEMP/package-check"
4848 "$RUNNER_TEMP/package-check/bin/pip" install --upgrade pip
4949 "$RUNNER_TEMP/package-check/bin/pip" install dist/*.whl
50- "$RUNNER_TEMP/package-check/bin/python" -c "import socketdev; from socketdev.version import __version__; print('wheel smoke OK', __version__)"
50+ "$RUNNER_TEMP/package-check/bin/python" -I - c "import socketdev; from socketdev.version import __version__; print('wheel smoke OK', __version__)"
5151
5252 - name : Upload distributions
53+ if : matrix.python-version == '3.12'
5354 uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
5455 with :
5556 name : socketdev-${{ github.sha }}
5657 path : dist/*
5758 if-no-files-found : error
5859 retention-days : 14
60+
61+ package-check :
62+ if : always()
63+ needs : package-check-python
64+ runs-on : ubuntu-latest
65+ steps :
66+ - name : Require all Python versions to pass
67+ env :
68+ RESULT : ${{ needs.package-check-python.result }}
69+ run : test "$RESULT" = success
0 commit comments