Skip to content

test: add e2e test

test: add e2e test #10

Workflow file for this run

name: e2e test
# triggered by labeled PR
on:
pull_request:
types: [ labeled ]
jobs:
e2e-test:
if: ${{ github.event.label.name == 'e2e' }}
strategy:
matrix:
# os: [ubuntu-latest, ubuntu-24.04-arm]
os: [ubuntu-latest]
# distro: [fedora-41, fedora-42, fedora-r43, centos-stream-9, centos-stream-10]
distro: [centos-stream-10]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build bootc RPM
env:
DISTRO: ${{ matrix.distro }}
BUILD_IMAGE: quay.io/fedora/fedora:42
run: |
podman run \
--rm \
--privileged \
-v $(pwd):/workdir:z \
-e DISTRO=$DISTRO \
--workdir /workdir \
$BUILD_IMAGE \
contrib/scripts/mock_build.sh
- name: Re-build bootc image with new bootc PRM
env:
DISTRO: ${{ matrix.distro }}
PR_NUMBER: ${{ github.event.number }}
run: |
set -xeu
if [[ $DISTRO =~ fedora ]]; then
VERSION_ID=$(cut -d'-' -f2 <<<"$DISTRO")
BASE_IMAGE="quay.io/fedora/fedora-bootc:${VERSION_ID}"
fi
if [[ $DISTRO =~ centos ]]; then
VERSION_ID=$(cut -d'-' -f3 <<<"$DISTRO")
BASE_IMAGE=":quay.io/centos-bootc/centos-bootc:stream${VERSION_ID}"
fi
tee target/build/Containerfile >/dev/null <<CONTAINERFILEEOF
FROM $BASE_IMAGE

Check failure on line 52 in .github/workflows/e2e.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/e2e.yml

Invalid workflow file

You have an error in your yaml syntax on line 52
RUN dnf -y upgrade /rpms/*.rpm && \
dnf -y clean all && \
rm -rf /var/cache /var/lib/dnf
CONTAINERFILEEOF
IMAGE_NAME="${DISTRO}:PR-${PR_NUMBER}-$(uname -m)"
podman build -v "$(pwd)/target/build/":/rpms:z -t $IMAGE_NAME target/build
podman push $IMAGE_NAME "docker://ghcr.io/bootc-dev/bootc/$IMAGE_URL"