Skip to content

Commit 5d35bf9

Browse files
committed
feat(tests): align workflow file with framework skaffold repo
Signed-off-by: Nathanael Liechti <technat@technat.ch>
1 parent bf7f2e6 commit 5d35bf9

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
2424
with:
2525
go-version-file: 'go.mod'
26+
cache: true
2627

2728
- name: Import GPG key
2829
id: import_gpg

.github/workflows/tests.yml

+22-17
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,60 @@ name: Tests
44
on:
55
push:
66
branches: [main]
7+
paths-ignore:
8+
- 'README.md'
79
pull_request:
810
branches: [main]
11+
paths-ignore:
12+
- 'README.md'
913

1014
jobs:
1115
build:
1216
name: Build
1317
runs-on: ubuntu-latest
1418
timeout-minutes: 10
15-
1619
steps:
17-
1820
- name: Check out code into the Go module directory
1921
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20-
2122
- name: Set up Go
2223
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
2324
with:
2425
go-version-file: 'go.mod'
25-
id: go
26-
26+
cache: true
27+
- name: Build provider
28+
run: make build
2729
- name: Run linters
2830
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
2931
with:
3032
version: v1.59.1
3133

34+
generate:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Check out code into the Go module directory
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39+
- name: Set up Go
40+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
41+
with:
42+
go-version-file: 'go.mod'
43+
cache: true
3244
# We need the latest version of Terraform for our documentation generation to use
3345
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
3446
name: Setup Terraform
3547
with:
3648
terraform_wrapper: false
37-
3849
- name: Generate
3950
run: make generate
40-
4151
- name: Confirm no diff
4252
run: |
4353
git diff --compact-summary --exit-code || \
44-
(echo "*** Unexpected differences after code generation. Run 'make generate' and commit."; exit 1)
54+
(echo; echo "Unexpected difference in directories after code generation. Run 'make generate' command and commit."; exit 1)
4555
46-
- name: Build
47-
run: make build
48-
4956
acceptance_tests:
5057
name: Acceptance Tests
51-
needs: build
58+
needs:
59+
- build
60+
- generate
5261
runs-on: ubuntu-latest
5362
timeout-minutes: 20
5463
strategy:
@@ -58,23 +67,20 @@ jobs:
5867
steps:
5968
- name: Check out code
6069
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61-
6270
- name: Setup Go
6371
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
6472
with:
6573
go-version-file: 'go.mod'
6674
check-latest: true
67-
75+
cache: true
6876
- name: Install Kustomize
6977
run: |
7078
curl -sL "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
7179
chmod +x ./kustomize
72-
7380
- name: Install Kind 0.24.0
7481
run: |
7582
curl -sLo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-$(uname)-amd64
7683
chmod +x ./kind
77-
7884
- name: Set up ArgoCD ${{ matrix.argocd_version }}
7985
env:
8086
ARGOCD_VERSION: ${{ matrix.argocd_version }}
@@ -83,7 +89,6 @@ jobs:
8389
sh scripts/testacc_prepare_env.sh
8490
until $(nc -z 127.0.0.1 8080); do sleep 2;done
8591
netstat -tulpn
86-
8792
- name: Run acceptance tests
8893
env:
8994
ARGOCD_VERSION: ${{ matrix.argocd_version }}

0 commit comments

Comments
 (0)