Revert "Remove to build selinux" #34
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: Integration tests | |
on: | |
push: | |
branches: [main, hirte-*] | |
pull_request: | |
branches: [main, hirte-*] | |
workflow_dispatch: | |
jobs: | |
rpmbuild: | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/bluechi/build-base:latest | |
env: | |
ARTIFACTS_DIR: exported-artifacts | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: 'true' | |
# Use githash of a tested commit instead of merge commit | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Perform build | |
run: | | |
./build-scripts/build-rpm.sh $ARTIFACTS_DIR | |
- name: Create DNF repository | |
run: | | |
createrepo_c $ARTIFACTS_DIR | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpm-artifacts | |
path: ${{ env.ARTIFACTS_DIR}} | |
test: | |
needs: rpmbuild | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
genisoimage \ | |
libkrb5-dev \ | |
libvirt-daemon-system \ | |
libvirt-dev \ | |
pkg-config \ | |
podman \ | |
qemu-kvm \ | |
-y | |
- name: Install unpackaged python libraries from PyPi | |
run: | | |
pip install "tmt[provision]" "tmt[report-junit]" podman pytest pytest-timeout | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: rpm-artifacts | |
path: 'tests/bluechi-rpms' | |
- name: Run integration tests | |
run: | | |
cd tests | |
tmt run -eCONTAINER_USED=integration-test-local | |
- name: Show tmt log output in case of failure | |
if: ${{ failure() }} | |
run: | | |
cat /var/tmp/tmt/run-001/log.txt | |
- name: Gather tests artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-artifacts | |
path: '/var/tmp/tmt' | |