Skip to content

CI: go lint action #713

CI: go lint action

CI: go lint action #713

Workflow file for this run

name: lint
on:
push:
branches:
- main
- 'release/**'
pull_request:
jobs:
go:
timeout-minutes: 5
name: "go | ${{ matrix.goos }} | ${{ matrix.goversion }}"
runs-on: "${{ matrix.os }}"
strategy:
matrix:
include:
- os: ubuntu-24.04
goos: linux
goversion: latest-stable
- os: ubuntu-24.04
goos: freebsd
goversion: latest-stable
# FIXME: this is currently failing in a non-sensical way, so, running on linux instead...
# - os: windows-2022
- os: ubuntu-24.04
goos: windows
goversion: latest-stable
- os: ubuntu-24.04
goos: linux
goversion: canary
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: "Install go linters"
uses: ./.github/actions/install-go-linters
with:
strategy: ${{ matrix.goversion }}
- name: "`make lint-imports`"
# Import ordering is not influenced by GOOS - running it multiple times is thus unnecessary
# Note we are picking freebsd as the GOOS to run it on, as linux is running multiple times (eg: canary)
if: ${{ inputs.goos=='freebsd' }}
shell: bash
run: |
make lint-imports
- name: "`make lint-go` for ${{ inputs.goos }} and $GO_VERSION"
env:
VERBOSE: true
GOOS: ${{ inputs.goos }}
shell: bash
run: |
make lint-go
other:
timeout-minutes: 5
name: yaml | shell
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: yaml
run: make lint-yaml
- name: shell
run: make lint-shell