2023-08-12 15:05:40 +02:00
|
|
|
name: 🧪 Test for podman
|
2023-03-11 02:53:07 +01:00
|
|
|
|
2022-06-30 23:04:28 +02:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
2023-08-07 15:04:55 +02:00
|
|
|
workflow_dispatch:
|
2022-06-30 23:04:28 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
podman-tests:
|
2023-08-07 15:04:55 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2022-06-30 23:04:28 +02:00
|
|
|
steps:
|
2022-10-13 02:06:43 +02:00
|
|
|
- uses: actions/checkout@v3
|
2023-06-05 18:24:33 +02:00
|
|
|
- name: Install just
|
|
|
|
uses: taiki-e/install-action@just
|
2023-06-12 07:29:08 +02:00
|
|
|
- name: Install requirements
|
|
|
|
run: sudo env PATH=$PATH just ci-prepare
|
2023-08-07 15:04:55 +02:00
|
|
|
- name: Install skopeo and podman requirements
|
|
|
|
run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev bats socat
|
|
|
|
|
|
|
|
# setup go
|
|
|
|
- uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '1.20'
|
|
|
|
|
|
|
|
# build skopeo
|
|
|
|
# These build steps are taken from https://github.com/containers/skopeo/issues/1648#issuecomment-1132161659
|
|
|
|
- name: Download skopeo 1.13.1 source # because ubuntu 22.04 does not have latest, and podman tests depend on that
|
|
|
|
run: mkdir /tmp/skopeo && curl -fsSL "https://github.com/containers/skopeo/archive/v1.13.1.tar.gz" | tar -xzf - -C /tmp/skopeo --strip-components=1
|
|
|
|
- name: Build skopeo
|
|
|
|
run: cd /tmp/skopeo && DISABLE_DOCS=1 make
|
|
|
|
- name: copy skopeo binaries
|
|
|
|
run: sudo cp /tmp/skopeo/bin/skopeo /usr/local/bin/skopeo && sudo cp /tmp/skopeo/default-policy.json /etc/containers/policy.json
|
|
|
|
- name: Skopeo version
|
|
|
|
run: skopeo --version
|
|
|
|
|
|
|
|
# build youki
|
|
|
|
- run: just youki-release
|
|
|
|
- run: sudo rm /usr/bin/crun && sudo cp youki /usr/local/bin && sudo cp youki /usr/bin/crun
|
|
|
|
|
|
|
|
# build podman
|
2022-06-30 23:04:28 +02:00
|
|
|
- name: Clone podman repository
|
2022-10-13 02:06:43 +02:00
|
|
|
uses: actions/checkout@v3
|
2022-06-30 23:04:28 +02:00
|
|
|
with:
|
|
|
|
repository: containers/podman
|
|
|
|
- name: Build podman
|
|
|
|
run: make binaries
|
|
|
|
- name: Install tools
|
|
|
|
run: make install.tools
|
2023-08-07 15:04:55 +02:00
|
|
|
|
|
|
|
# run tests
|
2022-06-30 23:04:28 +02:00
|
|
|
- name: Run podman test
|
2023-08-07 15:04:55 +02:00
|
|
|
run: BATS_TEST_TMPDIR=$(mktemp -d --tmpdir=${BATS_TMPDIR:-/tmp} podman_bats.XXXXXX) && PODMAN_TMPDIR=$BATS_TEST_TMPDIR && OCI_RUNTIME=/usr/local/bin/youki sudo make localsystem 2>&1 | tee build.log
|
2022-06-30 23:04:28 +02:00
|
|
|
- name: Adding Summary
|
|
|
|
run: |
|
2023-08-07 15:04:55 +02:00
|
|
|
echo "Total tests: 600+ Failed tests: $(cat build.log | grep " ok " | wc -l)" >> $GITHUB_STEP_SUMMARY
|