Add ci for pull requests #4
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: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.11", "3.12"] | |
container: | |
image: "fedora:latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Install python ${{ matrix.python-version }}" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: pip-${{ hashFiles('pyproject.toml') }} | |
restore-keys: pip- | |
- name: "Install dependencies" | |
run: | | |
dnf -y install make | |
pipx install hatch | |
make system/fedora | |
- name: Run unittests | |
run: hatch run +py=${{ matrix.python-version }} test:unit |