Skip to content

Merge pull request #142 from openSUSE/fix/suma/head/fix-test_grubimag… #351

Merge pull request #142 from openSUSE/fix/suma/head/fix-test_grubimag…

Merge pull request #142 from openSUSE/fix/suma/head/fix-test_grubimag… #351

Workflow file for this run

name: Testing Cobbler
on:
push:
branches: [ suma/4.3, suma/head, uyuni/master ]
pull_request:
branches: [ suma/4.3, suma/head, uyuni/master ]
jobs:
run_tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Pull Docker Test Container
run: docker pull registry.opensuse.org/systemsmanagement/cobbler/github-ci/containers/cobbler-test-github:suma-head
- name: Run previously built Docker Container
run: docker run --privileged -t -d -v $PWD:/code --name cobbler registry.opensuse.org/systemsmanagement/cobbler/github-ci/containers/cobbler-test-github:suma-head
- name: Setup Cobbler in the Container
shell: 'script -q -e -c "bash {0}"'
run: |
docker exec -u 0 -it cobbler bash -c "./docker/develop/scripts/setup-supervisor.sh"
- name: Run the Tests inside the Docker Container
shell: 'script -q -e -c "bash {0}"'
run: |
# Excluding "tests/actions/mkloaders_test.py::test_grubimage_run" as it is only prepared for SUMA/Uyuni containers
docker exec -u 0 -it cobbler bash -c "pytest -k 'not test_grubimage_run' --benchmark-skip --cov=./cobbler && codecov --token=1064928c-6477-41be-9ac2-7ce5e6d1fd8b --commit=${GITHUB_SHA}"
- name: Stop and remove the container
run: docker stop cobbler && docker rm cobbler