]> ruderich.org/simon Gitweb - safcm/safcm.git/blob - ci/run
Use SPDX license identifiers
[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 # shellcheck disable=SC2086
20 make $flags
21 # shellcheck disable=SC2086
22 make test $flags
23 make lint
24
25 # Strict umask
26 umask 077
27 rm -rf ./*
28 git checkout .
29 # shellcheck disable=SC2086
30 make $flags
31 # shellcheck disable=SC2086
32 make test $flags
33
34 # Additional static checks only run in CI
35 go get honnef.co/go/tools/cmd/staticcheck
36 staticcheck ./...
37
38 test -z "$(git clean -nd)" # any untracked files left?
39 make clean
40 test -z "$(git clean -ndx)" # any unignored files left?