build: re-add 3.12 #81
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: actions | |
on: | |
push: | |
pull_request: | |
branches: | |
- $default-branch | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.8', 'pypy3.8', '3.9', 'pypy3.9', '3.10', '3.11', '3.12.3'] | |
exclude: | |
- os: macos-latest | |
python-version: '3.8' | |
- os: macos-latest | |
python-version: 'pypy3.8' | |
- os: macos-latest | |
python-version: '3.9' | |
- os: macos-latest | |
python-version: 'pypy3.9' | |
- os: macos-latest | |
python-version: '3.10' | |
include: | |
- os: macos-13 | |
python-version: '3.8' | |
- os: macos-13 | |
python-version: 'pypy3.8' | |
- os: macos-13 | |
python-version: '3.9' | |
- os: macos-13 | |
python-version: 'pypy3.9' | |
- os: macos-13 | |
python-version: '3.10' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: pip install -r requirements_ci.txt | |
- run: git clone https://github.com/PyCQA/pycodestyle ../pycodestyle | |
- run: cd ../pycodestyle && python setup.py build && cd - | |
- run: git clone https://github.com/mbdevpl/argunparse ../argunparse | |
- run: cd ../argunparse && pip install -r requirements_test.txt && python setup.py build && cd - | |
- run: git clone https://github.com/python-semver/python-semver ../semver | |
- run: cd ../semver && python -m build && cd - | |
- if: matrix.os != 'windows-latest' | |
run: pip install jupyter # example package that uses metadata.json | |
- run: python -m coverage run --branch --source . -m unittest -v | |
- run: python -m coverage run --append --branch --source . -m unittest -v test.test_version | |
env: | |
LOGGING_LEVEL: critical | |
- run: python -m coverage report --show-missing | |
- run: codecov | |
publish: | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
architecture: x64 | |
- run: pip install build | |
- run: python -m build | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |