Skip to content

Commit 762b7df

Browse files
committed
ci: e2e
Signed-off-by: Philippe Martin <[email protected]>
1 parent 9eb8cfd commit 762b7df

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/e2e-tests.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#
2+
# Copyright (C) 2025 Red Hat, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
18+
name: pr-check
19+
20+
permissions:
21+
contents: read
22+
23+
on: [pull_request]
24+
25+
jobs:
26+
e2e-tests:
27+
name: e2e tests
28+
runs-on: ubuntu-24.04
29+
strategy:
30+
fail-fast: true
31+
steps:
32+
- uses: actions/checkout@v6
33+
34+
- name: Update podman to 5.x
35+
if: runner.os == 'Linux'
36+
run: |
37+
echo "ubuntu version from kubic repository to install podman we need (v5)"
38+
ubuntu_version='23.10'
39+
echo "Add unstable kubic repo into list of available sources and get the repo key"
40+
sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list"
41+
curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add -
42+
echo "Updating all dependencies..."
43+
sudo apt-get update -qq
44+
echo "install necessary dependencies for criu package which is not part of ${ubuntu_version}"
45+
sudo apt-get install -qq libprotobuf32t64 python3-protobuf libnet1
46+
echo "install criu manually from static location"
47+
curl -sLO http://archive.ubuntu.com/ubuntu/pool/universe/c/criu/criu_3.16.1-2_amd64.deb && sudo dpkg -i criu_3.16.1-2_amd64.deb
48+
echo "installing/update podman package..."
49+
sudo apt-get -qq -y install podman || { echo "Start fallback steps for podman nightly installation from a static mirror" && \
50+
sudo sh -c "echo 'deb http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" && \
51+
curl -L "http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add - && \
52+
sudo apt-get update && \
53+
sudo apt-get -y install podman; }
54+
podman version
55+
56+
- name: Revert unprivileged user namespace restrictions in Ubuntu 24.04
57+
if: runner.os == 'Linux'
58+
run: |
59+
# allow unprivileged user namespace
60+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
61+
62+
- name: Set cgroup_manager to 'cgroupfs' instead of systemd
63+
if: runner.os == 'Linux'
64+
run: |
65+
mkdir -p ~/.config/containers
66+
cat <<EOT >> ~/.config/containers/containers.conf
67+
[engine]
68+
cgroup_manager="cgroupfs"
69+
EOT
70+
podman info
71+
72+
- name: Download Podman Desktop
73+
shell: bash
74+
run: |
75+
PD_VERSION=1.23.1
76+
echo "Downloading PD desktop to ${{ github.workspace }}/podman-desktop"
77+
curl -sL "https://github.com/podman-desktop/podman-desktop/releases/download/v${PD_VERSION}/podman-desktop-${PD_VERSION}.tar.gz" | tar xvz
78+
# Move the extracted folder to the podman-desktop folder
79+
mv podman-desktop-${PD_VERSION}/ podman-desktop/

0 commit comments

Comments
 (0)