Skip to content

Commit 68379fd

Browse files
author
David Collom
committed
revert workflow changes
1 parent a8d1807 commit 68379fd

File tree

2 files changed

+27
-30
lines changed

2 files changed

+27
-30
lines changed

.github/workflows/build-test.yaml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,22 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12-
setup:
13-
name: "Checkout and Setup"
12+
lint:
13+
permissions:
14+
contents: read # for actions/checkout to fetch code
15+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
16+
checks: write # for golangci/golangci-lint-action to annotate Pull Requests
17+
name: Lint Go code
1418
runs-on: ubuntu-latest
1519
steps:
1620
- name: Checkout code
1721
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
1823
- name: Setup Golang
1924
uses: actions/setup-go@v5
2025
with:
2126
go-version-file: go.mod
2227

23-
lint:
24-
needs:
25-
- setup
26-
permissions:
27-
contents: read # for actions/checkout to fetch code
28-
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
29-
checks: write # for golangci/golangci-lint-action to annotate Pull Requests
30-
name: Lint Go code
31-
runs-on: ubuntu-latest
32-
steps:
3328
- name: Run golangci-lint
3429
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
3530
with:
@@ -38,23 +33,31 @@ jobs:
3833
only-new-issues: true
3934

4035
govulncheck:
41-
needs:
42-
- setup
4336
runs-on: ubuntu-latest
4437
name: Run govulncheck
4538
steps:
39+
# We only need to checkout as govuln does the go setup...
40+
- name: Checkout code
41+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
42+
4643
- id: govulncheck
4744
uses: golang/govulncheck-action@v1
4845
with:
4946
go-version-file: go.mod
5047
go-package: ./...
5148

5249
test:
53-
needs:
54-
- setup
5550
name: Run unit tests for Go packages
5651
runs-on: ubuntu-latest
5752
steps:
53+
- name: Checkout code
54+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
55+
56+
- name: Setup Golang
57+
uses: actions/setup-go@v5
58+
with:
59+
go-version-file: go.mod
60+
5861
- name: Download and required packages
5962
run: |
6063
make deps
@@ -79,7 +82,6 @@ jobs:
7982

8083
build:
8184
needs:
82-
- setup
8385
- test
8486
- lint
8587
runs-on: ubuntu-latest
@@ -91,6 +93,9 @@ jobs:
9193
- linux/arm64
9294
name: Build Images
9395
steps:
96+
- name: Checkout code
97+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
98+
9499
- name: Set up QEMU
95100
uses: docker/setup-qemu-action@v3
96101

pkg/controller/checker/checker_test.go

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ func TestIsLatestSHA(t *testing.T) {
579579
SHA: "456",
580580
Tag: "foo",
581581
Children: []*api.ImageTag{
582-
&api.ImageTag{
582+
{
583583
SHA: "123",
584584
},
585585
},
@@ -598,12 +598,8 @@ func TestIsLatestSHA(t *testing.T) {
598598
SHA: "",
599599
Tag: "foo",
600600
Children: []*api.ImageTag{
601-
&api.ImageTag{
602-
SHA: "123",
603-
},
604-
&api.ImageTag{
605-
SHA: "456",
606-
},
601+
{SHA: "123"},
602+
{SHA: "456"},
607603
},
608604
},
609605
expResult: &Result{
@@ -619,12 +615,8 @@ func TestIsLatestSHA(t *testing.T) {
619615
searchResp: &api.ImageTag{
620616
SHA: "",
621617
Children: []*api.ImageTag{
622-
&api.ImageTag{
623-
SHA: "456",
624-
},
625-
&api.ImageTag{
626-
SHA: "789",
627-
},
618+
{SHA: "456"},
619+
{SHA: "789"},
628620
},
629621
},
630622
expResult: &Result{

0 commit comments

Comments
 (0)