]> ruderich.org/simon Gitweb - safcm/safcm.git/blob - ci/run
sync: run most tests which modify the host only in CI
[safcm/safcm.git] / ci / run
1 #!/bin/sh
2
3 set -eu
4 set -x
5
6
7 PATH=$HOME/go/bin:$PATH
8 export PATH
9
10 flags=
11 if test $# -ne 0; then
12     flags="$*"
13 fi
14
15 # Run additional tests in CI
16 SAFCM_CI_RUN=1
17 export SAFCM_CI_RUN
18
19 make $flags
20 make test $flags
21
22 # Strict umask
23 umask 077
24 rm -rf ./*
25 git checkout .
26 make $flags
27 make test $flags
28
29 # Additional static checks only run in CI
30 go get honnef.co/go/tools/cmd/staticcheck
31 staticcheck ./...
32
33 test -z "$(git clean -nd)" # any untracked files left?
34 make clean
35 test -z "$(git clean -ndx)" # any unignored files left?