Add a caching wrapper #105
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: Python package | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
fedora-version: [39, 40, 41, rawhide] | |
steps: | |
- name: Set up podman | |
run: | | |
sudo apt update | |
sudo apt-get -y install podman | |
podman pull registry.fedoraproject.org/fedora:${{ matrix.fedora-version }} | |
- uses: actions/checkout@v4 | |
- name: Test with pytest | |
run: | | |
{ | |
echo 'FROM registry.fedoraproject.org/fedora:${{ matrix.fedora-version }}' | |
echo 'RUN dnf install -y python3-pip python3-dnf' | |
echo 'WORKDIR /src' | |
echo 'RUN python3 -m pip install . pytest' | |
echo 'RUN pytest -v' | |
} > podmanfile | |
podman build -v $(pwd):/src --tag test -f ./podmanfile | |