1 .template-docker: &template-docker
4 - apt-get install --no-install-recommends --yes golang golang-golang-x-tools golang-github-pkg-errors-dev golang-github-burntsushi-toml-dev build-essential clang git
6 - 'test -z "$GOPATH" && export GOPATH=/usr/share/gocode'
7 # Run as user nobody so CAP_DAC_OVERRIDE is dropped and the tests can
8 # chmod a file 0000 to force "permission denied" errors.
9 - export HOME=/tmp # writable by nobody
11 # Empty TEST_* as -fsanitize doesn't work in a Docker container
12 - runuser -p -u nobody -- make TEST_CFLAGS= TEST_LDFLAGS=
13 - runuser -p -u nobody -- make test TEST_CFLAGS= TEST_LDFLAGS=
14 - 'test -z "$(git clean -nd)"' # any untracked files left?
15 - runuser -p -u nobody -- make clean
16 - 'test -z "$(git clean -ndx)"' # any unignored files left?
18 - runuser -p -u nobody -- make CC=clang TEST_CFLAGS= TEST_LDFLAGS=
19 - runuser -p -u nobody -- make test CC=clang TEST_CFLAGS= TEST_LDFLAGS=