From cc4a7303815ca351fb7bd98168553a49a8d07dfe Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 18 Dec 2024 10:33:19 +0100 Subject: [PATCH] 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. --- .github/workflows/pytest.yml | 24 ++++++++++++++++++++++++ .github/workflows/testdeps.yml | 7 +++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pytest.yml diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..45a61d5 --- /dev/null +++ b/.github/workflows/pytest.yml @@ -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 diff --git a/.github/workflows/testdeps.yml b/.github/workflows/testdeps.yml index 09a02c6..85f9de1 100644 --- a/.github/workflows/testdeps.yml +++ b/.github/workflows/testdeps.yml @@ -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