Fix version number #56
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: main | |
on: [push, pull_request] | |
env: | |
FORCE_COLOR: "1" | |
PY_COLORS: "1" | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
ubuntu-version: [ubuntu-latest, ubuntu-24.04] | |
runs-on: ${{ matrix.ubuntu-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends libyaml-dev libegl1 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-shape0 libxcb-cursor0 xserver-xephyr xvfb | |
- run: pip install tox | |
- run: tox -e py | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- run: pip install tox | |
- run: tox -e py -- tests/test_xvfb_windows.py | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
env: [format, mypy] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- run: pip install tox | |
- run: tox -e ${{ matrix.env }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [tests, windows, lint] | |
environment: pypi | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Build package | |
run: | | |
python -m pip install --upgrade pip setuptools | |
pip install build | |
python -m build | |
- name: Publish package to PyPI | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 |