1
0
mirror of https://github.com/containers/youki synced 2024-11-10 03:31:41 +01:00
youki/.github/workflows/podman_tests.yaml

56 lines
2.2 KiB
YAML
Raw Normal View History

name: 🧪 Test for podman
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
podman-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install just
uses: taiki-e/install-action@just
- name: Install requirements
run: sudo env PATH=$PATH just ci-prepare
- 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
- name: Clone podman repository
uses: actions/checkout@v3
with:
repository: containers/podman
- name: Build podman
run: make binaries
- name: Install tools
run: make install.tools
# run tests
- name: Run podman test
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
- name: Adding Summary
run: |
echo "Total tests: 600+ Failed tests: $(cat build.log | grep " ok " | wc -l)" >> $GITHUB_STEP_SUMMARY