File tree Expand file tree Collapse file tree 3 files changed +49
-42
lines changed Expand file tree Collapse file tree 3 files changed +49
-42
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Containers
3+
4+ on :
5+ push :
6+ branches : [master]
7+ pull_request :
8+ branches : [master]
9+
10+ env :
11+ GO_TOOLCHAIN : " 1.15"
12+ GOPATH : " /opt"
13+ BUILD_DIR : " /opt/src/github.com/coreos/go-systemd"
14+
15+ jobs :
16+ ditro-test :
17+ name : " Distro test"
18+ runs-on : ubuntu-latest
19+ strategy :
20+ matrix :
21+ baseimage : ['debian:stretch', 'ubuntu:16.04', 'ubuntu:18.04']
22+ steps :
23+ - run : sudo apt-get -qq update
24+ - name : Install libsystemd-dev
25+ run : sudo apt-get install libsystemd-dev
26+ - uses : actions/checkout@v2
27+ - name : Setup go
28+ uses : actions/setup-go@v1
29+ with :
30+ go-version : ${{ env['GO_TOOLCHAIN'] }}
31+ - name : Go build (source)
32+ run : ./scripts/travis/pr-test.sh build_source
33+ - name : Go build (tests)
34+ run : ./scripts/travis/pr-test.sh build_tests
35+ - name : Pull base image - ${{ matrix.baseimage }}
36+ run : docker pull ${{ matrix.baseimage }}
37+ - name : Install packages for ${{ matrix.baseimage }}
38+ run : docker run --privileged -e GOPATH=${GOPATH} --cidfile=/tmp/cidfile ${{ matrix.baseimage }} /bin/bash -c "apt-get update && apt-get install -y sudo build-essential git golang dbus libsystemd-dev libpam-systemd systemd-container"
39+ - name : Persist base container
40+ run : docker commit `cat /tmp/cidfile` go-systemd/container-tests
41+ - run : rm -f /tmp/cidfile
42+ - name : Run systemd from ${{ matrix.baseimage }}
43+ run : docker run --shm-size=2gb -d --cidfile=/tmp/cidfile --privileged -e GOPATH=${GOPATH} -v ${PWD}:${BUILD_DIR} go-systemd/container-tests /bin/systemd --system
44+ - name : Run tests
45+ run : docker exec --privileged `cat /tmp/cidfile` /bin/bash -c "cd ${BUILD_DIR} && ./scripts/travis/pr-test.sh run_tests"
46+ - name : Cleanup
47+ run : docker kill `cat /tmp/cidfile`
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ jobs:
1414 build :
1515 name : " Build"
1616 runs-on : ubuntu-latest
17- continue-on-error : true
1817 strategy :
1918 matrix :
2019 go : ['1.14', '1.15']
2120 steps :
21+ - run : sudo apt-get -qq update
2222 - name : Install libsystemd-dev
2323 run : sudo apt-get install libsystemd-dev
2424 - uses : actions/checkout@v2
3737 build-minimum :
3838 name : " Build on minimum supported toolchain"
3939 runs-on : ubuntu-latest
40- continue-on-error : true
4140 steps :
41+ - run : sudo apt-get -qq update
4242 - name : Install libsystemd-dev
4343 run : sudo apt-get install libsystemd-dev
4444 - uses : actions/checkout@v2
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments