Update chrisomatic:0.8.2 #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test miniChRIS-podman with miniChRIS-docker's test suite | |
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test-podman: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Pre-installed Podman version is version 3, we need to install version 4. | |
- name: Install latest Podman | |
run: | | |
# https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-resource-limits-fails-with-a-permissions-error | |
# In Github Actions, we can't just log in and out so we'll have to manipulate /sys files. | |
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_monitoring_and_updating_the_kernel/assembly_using-cgroupfs-to-manually-manage-cgroups_managing-monitoring-and-updating-the-kernel | |
sudo sh -c " | |
echo '+cpu +io +memory +pids' > /sys/fs/cgroup/user.slice/cgroup.subtree_control | |
echo '+cpu +io +memory +pids' >> /sys/fs/cgroup/user.slice/user-$(id -u).slice/cgroup.subtree_control | |
echo '+cpu +io +memory +pids' >> /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.subtree_control | |
" | |
# https://podman.io/getting-started/installation#ubuntu | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/Release.key \ | |
| gpg --dearmor \ | |
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\ | |
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/ /" \ | |
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null | |
sudo apt-get update | |
sudo apt-get -y install podman | |
systemctl --user daemon-reload | |
systemctl --user restart podman.service | |
- name: Podman Info | |
run: podman info | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start CUBE | |
run: ./minichris.sh up | |
- name: Checkout miniChRIS-docker | |
uses: actions/checkout@v4 | |
with: | |
repository: FNNDSC/miniChRIS-docker | |
path: ./miniChRIS-docker | |
- name: Test | |
run: | | |
set +e | |
./miniChRIS-docker/test.sh | |
rc=$? | |
# if tests fail, print out all logs | |
if [ "$rc" != '0' ]; then | |
set -x | |
for c in $(podman ps -a --format '{{ .Names }}' --filter 'name=minichris'); do | |
podman logs $c | |
done | |
fi | |
exit $rc | |
- name: Stop CUBE | |
run: ./minichris.sh down |