Skip to content

Commit 3646382

Browse files
committed
chore(deps): modify action config
- Pins actions to commit hash of release. - Sets `actions/setup-go` to use `go.mod` for the Go version. - Formats the YAML. Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
1 parent 4b4482d commit 3646382

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

.github/workflows/test.yml

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,36 @@
1-
name: Test and coverage
1+
name: Test and Code Coverage
22

3-
on: [pull_request, push]
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- 'README.md'
7+
push:
8+
paths-ignore:
9+
- 'README.md'
410

511
env:
612
BUILD_TAGS: 'akscluster cluster clustergroup credential ekscluster gitrepository iampolicy kustomization namespace custompolicy imagepolicy networkpolicy quotapolicy securitypolicy sourcesecret workspace tanzupackage tanzupackages packagerepository packageinstall clustersecret integration mutationpolicy backupschedule targetlocation dataprotection tanzukubernetescluster clusterclass managementcluster provisioner inspections custompolicytemplate customiamrole permissiontemplate'
13+
714
jobs:
815
build:
9-
name: Test and coverage
16+
name: Test and Code Coverage
1017
runs-on: ubuntu-latest
1118
steps:
12-
- uses: actions/checkout@v4
13-
14-
- name: Set up Go
15-
uses: actions/setup-go@v5
19+
- name: Checkout
20+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
21+
- name: Setup Go
22+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
1623
with:
17-
go-version: 1.19
18-
24+
go-version-file: 'go.mod'
25+
cache: true
1926
- name: Build
2027
run: |
2128
go build -v ./...
22-
2329
- name: Unit Test
2430
run: |
2531
go test $(go list ./... | grep -v /internal/client | grep -v /internal/models) -coverprofile=coverage.out -covermode=atomic
26-
2732
- name: Mock Test
2833
run: |
2934
go test $(go list ./... | grep -v /internal/client | grep -v /internal/models) -tags $BUILD_TAGS
30-
31-
- name: Upload coverage to Codecov
32-
uses: codecov/codecov-action@v5
35+
- name: Upload to Codecov
36+
uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2

0 commit comments

Comments
 (0)