Skip to content

Commit 1a18182

Browse files
committed
feat(ci): add a workflow to run basics golang checks on pull requests
1 parent 139f362 commit 1a18182

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/pr.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,28 @@ jobs:
1616
shell_check:
1717
name: "Shell: Syntax checks"
1818
uses: scaleway-terraform-modules/workflows/.github/workflows/shell_check.yaml@b3e9858717c6b0940146899c8b58871a6dd13924 # v2.1.10
19+
go_check:
20+
name: "Go: Syntax checks"
21+
runs-on: ubuntu-latest
22+
steps:
23+
- id: repo_checkout
24+
name: "Repository: Checkout"
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
- id: "go_setup"
27+
name: "Go: Setup"
28+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
29+
with:
30+
go-version-file: 'functions/purge/go.mod'
31+
cache-dependency-path: |
32+
functions/purge/go.sum
33+
- id: "go_fmt"
34+
name: "Go: Check formatting"
35+
run: go fmt
36+
working-directory: functions/purge
37+
- id: "go_build"
38+
name: "Go: Build the package"
39+
run: go build
40+
working-directory: functions/purge
1941
tf_module_check:
2042
name: "Terraform Module: Code checks"
2143
uses: scaleway-terraform-modules/workflows/.github/workflows/tf_module_check.yaml@b3e9858717c6b0940146899c8b58871a6dd13924 # v2.1.10

0 commit comments

Comments
 (0)