File tree 3 files changed +49
-42
lines changed
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:
14
14
build :
15
15
name : " Build"
16
16
runs-on : ubuntu-latest
17
- continue-on-error : true
18
17
strategy :
19
18
matrix :
20
19
go : ['1.14', '1.15']
21
20
steps :
21
+ - run : sudo apt-get -qq update
22
22
- name : Install libsystemd-dev
23
23
run : sudo apt-get install libsystemd-dev
24
24
- uses : actions/checkout@v2
37
37
build-minimum :
38
38
name : " Build on minimum supported toolchain"
39
39
runs-on : ubuntu-latest
40
- continue-on-error : true
41
40
steps :
41
+ - run : sudo apt-get -qq update
42
42
- name : Install libsystemd-dev
43
43
run : sudo apt-get install libsystemd-dev
44
44
- uses : actions/checkout@v2
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments