Drop python 3.7 and 3.8; add 3.13 support #279
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: test & publish | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Test python-${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.9, '3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: "latest" | |
enable-cache: true | |
cache-dependency-glob: "**/setup.py" | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
- name: Install python | |
run: uv venv --python ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
uv pip install pycodestyle unittest-xml-reporting | |
uv pip install . | |
- name: Test | |
run: uv run -m xmlrunner discover -v -o test-results/test/ | |
- name: Pycodestyle | |
run: uv run -m pycodestyle cr8 | |
- name: Upload results to wacklig | |
env: | |
WACKLIG_TOKEN: ${{ secrets.WACKLIG_TOKEN }} | |
run: | | |
curl -s https://raw.githubusercontent.com/pipifein/wacklig-uploader/master/wacklig.py | uv run - --token "$WACKLIG_TOKEN" || echo "Upload to wacklig failed" | |
publish: | |
name: Build & publish package to pypi | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up python 3.7 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.7 | |
cache: "pip" | |
cache-dependency-path: setup.py | |
- name: Build package | |
run: | | |
python -m pip install twine wheel | |
python setup.py sdist bdist_wheel | |
twine check dist/*.tar.gz | |
- name: Publish package | |
uses: mfussenegger/gh-action-pypi-publish@63c35b2cc56443d44589efa87a970cc1895ce79a | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi }} |