CI: go lint action #714
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ${{ matrix.goos=='freebsd' }} | |
shell: bash | |
run: | | |
make lint-imports | |
- name: "`make lint-go` for ${{ matrix.goos }}" | |
env: | |
VERBOSE: true | |
GOOS: ${{ matrix.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 |