diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml index b6b1bfb6..cb0e23e5 100644 --- a/.github/workflows/pr-check.yaml +++ b/.github/workflows/pr-check.yaml @@ -78,3 +78,52 @@ jobs: - name: Run build run: yarn build + + e2e-tests: + name: bootc e2e tests + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + + # Checkout podman desktop + - uses: actions/checkout@v4 + with: + repository: containers/podman-desktop + ref: main + path: podman-desktop + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Update podman + run: | + sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" + curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/Release.key" | sudo apt-key add - + sudo apt-get update -qq + sudo apt-get -qq -y install podman || { echo "Start fallback steps for podman nightly installation from a static mirror" && \ + sudo sh -c "echo 'deb http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" && \ + curl -L "http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/Release.key" | sudo apt-key add - && \ + sudo apt-get update && \ + sudo apt-get -y install podman; } + podman version + # downgrade conmon package version to workaround issue with starting containers, see https://github.com/containers/conmon/issues/475 + # remove once the repository contains conmon 2.1.10 + wget https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/amd64/conmon_2.1.2~0_amd64.deb -O /tmp/conmon_2.1.2.deb + sudo apt install /tmp/conmon_2.1.2.deb + + - name: Build Podman Desktop for E2E tests + working-directory: ./podman-desktop + run: | + yarn --frozen-lockfile + yarn test:e2e:build + + - name: Get yarn cache directory path + working-directory: ./podman-desktop-extension-bootc + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT} + +