chore: add fieldalignment action

This commit is contained in:
Jan De Dobbeleer 2024-08-08 09:17:24 +02:00 committed by Jan De Dobbeleer
parent cefe985bf7
commit 38452b92a8
4 changed files with 14 additions and 21 deletions

View file

@ -19,16 +19,17 @@ jobs:
run:
working-directory: ${{ github.workspace }}/src
steps:
- name: Install Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
with:
go-version: 1.21
cache-dependency-path: src/go.sum
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Golang CI
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8
with:
working-directory: src
- name: Fieldalignment
run: |
go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
fieldalignment "./..."
- name: Unit Tests
run: go test -v ./...

View file

@ -19,13 +19,10 @@ jobs:
run:
working-directory: ${{ github.workspace }}/src
steps:
- name: Install Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
with:
go-version: 1.21
cache-dependency-path: src/go.sum
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd
with:

View file

@ -22,12 +22,10 @@ jobs:
with:
submodules: true
persist-credentials: false
- name: Install Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
with:
go-version: 1.21
cache-dependency-path: src/go.sum
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: 20.9.0
# Create Kind cluster to have a Kubernetes context for cloud-native-azure theme

View file

@ -9,13 +9,10 @@ jobs:
run:
working-directory: ${{ github.workspace }}/src
steps:
- name: Install Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
with:
go-version: 1.21
cache-dependency-path: src/go.sum
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Check for unused dependencies
run: |
go mod tidy