github: add new pytest based integration test run workflow

This commit adds a new workflow that runs the new `pytest` based
integration tests inside GH actions. It also extracts a common
`testdeps.yml` reusable workflow so that we do not duplicate the
package list of test dependencies.
This commit is contained in:
Michael Vogt 2024-12-18 10:33:19 +01:00
parent e7d8a39fcf
commit cc4a730381
2 changed files with 29 additions and 2 deletions

24
.github/workflows/pytest.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: Integration tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
uses: ./.github/workflows/testdeps.yml
steps:
- uses: actions/checkout@v4
- name: Install integration test env
run: |
sudo apt update
sudo apt install -y pytest golang
- name: Run integration tests via pytest
run: |
# use "-s" for now for easier debugging
sudo pytest -s -v

View file

@ -1,10 +1,13 @@
name: Install test dependencies
name: Install common test dependencies
on:
workflow_call:
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Install test dependencies
- name: Install common test dependencies
run: |
sudo apt update
sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev podman