-
-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Failures during test execution are ignored for now. Passing all tests can be achieved over time.
- Loading branch information
Showing
2 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Podman pipeline | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
go-version: [1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.x] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
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: modVerify | ||
run: go mod verify | ||
|
||
- name: modTidy | ||
run: go mod tidy | ||
|
||
- name: ensure compilation | ||
env: | ||
GOOS: linux | ||
run: go build | ||
|
||
- 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 ||: | ||
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$( lsb_release -rs )/Release.key | sudo apt-key add - | ||
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$( lsb_release -rs )/ /" | sudo tee /etc/apt/sources.list.d/podman.list /dev/null | ||
sudo apt-get update | ||
sudo apt-get install -y podman | ||
sudo systemctl start podman | ||
systemctl --user enable --now podman.socket | ||
systemctl --user status podman.socket | ||
podman info | ||
- name: Set DOCKER_HOST | ||
run: echo "DOCKER_HOST=unix:///$XDG_RUNTIME_DIR/podman/podman.sock" >> $GITHUB_ENV | ||
|
||
- 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: go run gotest.tools/gotestsum --format short-verbose -- -coverprofile=cover.txt ./... | ||
continue-on-error: true | ||
|
||
# only report code coverage on linux | ||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: ./cover.txt | ||
name: testcontainers-podman-go-${{ matrix.go-version }} |
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