3737 - name : Install dependencies
3838 run : |
3939 apk update
40- apk add curl findutils git go nodejs upx xz yara-x~1.12.0
40+ apk add curl findutils git gnutar go nodejs upx xz yara-x~1.12.0
4141
4242 - name : Checkout code
4343 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -47,13 +47,28 @@ jobs:
4747 - name : Trust repository
4848 run : git config --global --add safe.directory "${GITHUB_WORKSPACE}"
4949
50+ - name : Get Go cache paths
51+ id : go-env
52+ run : |
53+ echo "modcache=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
54+ echo "cache=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
55+
56+ - name : Cache Go dependencies
57+ uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
58+ with :
59+ path : |
60+ ${{ steps.go-env.outputs.modcache }}
61+ ${{ steps.go-env.outputs.cache }}
62+ key : go-${{ hashFiles('go.sum') }}
63+ restore-keys : go-
64+
5065 - name : Unit tests
5166 run : |
5267 make test
5368
5469 integration :
5570 if : ${{ github.repository == 'chainguard-dev/malcontent' }}
56- runs-on : ubuntu-latest-16 -core
71+ runs-on : ubuntu-latest-32 -core
5772 permissions :
5873 contents : read
5974 container :
6479 --cap-add SETUID
6580 --cap-drop ALL
6681 --cgroupns private
67- --cpu-shares=16384
82+ --cpu-shares=32768
6883 --memory-swappiness=0
6984 --security-opt no-new-privileges
7085 --ulimit core=0
7489 - name : Install dependencies
7590 run : |
7691 apk update
77- apk add curl findutils git go nodejs upx xz yara-x~1.12.0
92+ apk add curl findutils git gnutar go nodejs upx xz yara-x~1.12.0
7893
7994 - name : Checkout code
8095 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8499 - name : Trust repository
85100 run : git config --global --add safe.directory "${GITHUB_WORKSPACE}"
86101
102+ - name : Get Go cache paths
103+ id : go-env
104+ run : |
105+ echo "modcache=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
106+ echo "cache=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
107+
108+ - name : Cache Go dependencies
109+ uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
110+ with :
111+ path : |
112+ ${{ steps.go-env.outputs.modcache }}
113+ ${{ steps.go-env.outputs.cache }}
114+ key : go-${{ hashFiles('go.sum') }}
115+ restore-keys : go-
116+
117+ - name : Get samples commit
118+ id : samples
119+ run : echo "commit=$(grep '^SAMPLES_COMMIT' Makefile | head -1 | cut -d'=' -f2 | tr -d ' ?')" >> "$GITHUB_OUTPUT"
120+
121+ - name : Cache malcontent samples
122+ uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
123+ with :
124+ path : out/chainguard-sandbox/malcontent-samples
125+ key : samples-${{ steps.samples.outputs.commit }}
126+
127+ - name : Prepare samples
128+ run : make samples
129+
87130 - name : Integration tests
88131 run : |
89132 make integration
0 commit comments