File tree Expand file tree Collapse file tree 3 files changed +27
-6
lines changed
Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1+ FROM golang:1.15-alpine
2+
3+ # Add any build or testing essential system packages
4+ RUN apk add --no-cache build-base git
5+
6+ # Use the GitHub Actions uid:gid combination for proper fs permissions
7+ RUN addgroup -g 116 -S test && adduser -u 1001 -S -g test test
8+
9+ # Run as test user
10+ USER test
11+
12+ ENTRYPOINT ["/bin/sh" , "-c" ]
Original file line number Diff line number Diff line change 1+ name : ' Run tests'
2+ description : ' Run tests in docker container'
3+ inputs :
4+ command :
5+ description : ' Command to run inside the container'
6+ required : true
7+ default : ' make test'
8+ runs :
9+ using : ' docker'
10+ image : ' Dockerfile'
11+ args :
12+ - ${{ inputs.command }}
Original file line number Diff line number Diff line change @@ -15,14 +15,10 @@ jobs:
1515 - name : Restore Go cache
1616 uses : actions/cache@v1
1717 with :
18- path : ~ /go/pkg/mod
18+ path : /home/runner/work/_temp/_github_home /go/pkg/mod
1919 key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
2020 restore-keys : |
2121 ${{ runner.os }}-go-
22- - name : Setup Go
23- uses : actions/setup-go@v2
24- with :
25- go-version : 1.15.x
2622 - name : Setup Kubernetes
27232824 - name : Setup Kustomize
3228 - name : Setup Helm
3329 uses : fluxcd/pkg/actions/helm@main
3430 - name : Run tests
35- run : make test
31+ uses : ./.github/actions/run-tests
3632 env :
33+ GOPATH : /github/home/go
3734 KUBEBUILDER_ASSETS : ${{ github.workspace }}/kubebuilder/bin
3835 - name : Check if working tree is dirty
3936 run : |
You can’t perform that action at this time.
0 commit comments