74 lines (60 loc) · 2.3 KB
/
ci-podman.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Podman pipeline
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
go-version: [1.18.x, 1.x]
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Enable systemd user process
run: |
loginctl enable-linger $(whoami)
sleep 1
- name: Set XDG_RUNTIME_DIR
run: echo "XDG_RUNTIME_DIR=/run/user/$UID" >> $GITHUB_ENV
- name: Install Podman
run: |
set -x
sudo apt-get remove -y podman docker-ce docker docker-engine docker.io containerd runc ||:
sudo apt update
sudo apt install -y software-properties-common debian-archive-keyring dirmngr
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
sudo add-apt-repository -y "deb http://deb.debian.org/debian experimental main"
sudo apt update
sudo apt -y -t experimental install podman crun docker-compose
sudo systemctl daemon-reload
sleep 5
sudo systemctl start podman.socket
sudo podman info
- name: Set DOCKER_HOST
run: echo "DOCKER_HOST=unix:///run/podman/podman.sock" >> $GITHUB_ENV
- name: modVerify
run: go mod verify
- name: modTidy
run: go mod tidy
- name: gotestsum
# only run tests on linux, there are a number of things that won't allow the tests to run on anything else
# many (maybe, all?) images used can only be build on Linux, they don't have Windows in their manifest, and
# we can't put Windows Server in "Linux Mode" in Github actions
# another, host mode is only available on Linux, and we have tests around that, do we skip them?
run: sudo make test-unit
- name: modTidy e2e tests
run: make -C e2e tools-tidy
- name: Run e2e tests
run: sudo make test-e2e
- name: Run checker
run: |
./scripts/check_environment.sh
- name: Test Summary
uses: test-summary/action@77bb5a9f9c572416423f9a157cbf1159c1e75a4c
with:
paths: "**/TEST-*.xml"
if: always()