Bump actions/checkout from 3 to 4 #42
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.7, 3.8, 3.9, "3.10", 3.11, 3.12-dev] | |
ubuntu-version: [ubuntu-latest, ubuntu-20.04] | |
runs-on: ${{ matrix.ubuntu-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends libyaml-dev libegl1-mesa 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@v4 | |
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@v4 | |
- run: pip install tox | |
- run: tox -e ${{ matrix.env }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [tests, windows, lint] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Build package | |
run: | | |
python -m pip install --upgrade pip setuptools | |
pip install wheel | |
python setup.py sdist bdist_wheel | |
- name: Publish package to PyPI | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_token }} | |