Skip to content

Commit

Permalink
ci: Add a GH action to run blivet-gui test suite on PRs
Browse files Browse the repository at this point in the history
Reverse dependency testing for blivet-gui.
  • Loading branch information
vojtechtrefny committed Nov 14, 2023
1 parent 4ea77c3 commit ef7f24b
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/blivetgui_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Blivet-GUI tests

on:
pull_request:
branches:
- 3.*-devel

jobs:
build:
name: blivetgui-tests
runs-on: ubuntu-22.04
env:
CI_CONTAINER: blivet-ci-blivetgui-tests
steps:
- name: Checkout blivet repository
uses: actions/checkout@v4

- name: Install podman
run: |
sudo apt -qq update
sudo apt -y -qq install podman
- name: Build the container
run: |
podman build --no-cache -t ${{ env.CI_CONTAINER }} -f misc/ci.Dockerfile .
- name: Start the container
run: |
podman run -d -t --name ${{ env.CI_CONTAINER }} --privileged --volume "$(pwd):/app" --workdir "/app" ${{ env.CI_CONTAINER }}
- name: Install Blivet-GUI test dependencies in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "ansible-playbook -i "localhost," -c local /blivet-gui/misc/install-test-dependencies.yml"
- name: Remove Blivet from the container (we want to install from source)
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "dnf -y remove python3-blivet --noautoremove"
- name: Install Blivet build dependencies in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "ansible-playbook -i "localhost," -c local misc/install-test-dependencies.yml"
- name: Build and install Blivet in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "python3 setup.py install --prefix=/usr"
- name: Run Blivet-GUI static analysis in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "cd /blivet-gui && make check"
- name: Run Blivet-GUI unit tests in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "cd /blivet-gui && make gui-test"

0 comments on commit ef7f24b

Please sign in to comment.