Update python-tests.yml #36
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: "CI" | |
on: | |
push: | |
branches: [ dev ] | |
pull_request: | |
branches: [ dev ] | |
jobs: | |
run: | |
name: "tests & coverage" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' # caching pip dependencies | |
- name: Install APT packages | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: xvfb pkg-config python3-dev libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module | |
version: 1.0 | |
- name: Install hatch | |
run: | | |
python -m pip install hatch toga | |
- name: Coverage | |
run: xvfb-run -a hatch run cov | |
- name: Tests | |
run: xvfb-run -a hatch run +py=${{ matrix.python-version }} test:test |