-
Notifications
You must be signed in to change notification settings - Fork 777
78 lines (73 loc) · 2.19 KB
/
workflow-lint.yml
File metadata and controls
78 lines (73 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: lint
on:
push:
branches:
- main
- 'release/**'
pull_request:
jobs:
# Runs golangci to ensure that:
# 1. the tooling is working on the target platform
# 2. the linter is happy
# 3. for canary (if there is a canary go version), does lint for all supported goos
lint-go:
name: "go${{ inputs.hack }}"
uses: ./.github/workflows/job-lint-go.yml
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
goos: linux
- runner: ubuntu-24.04
goos: freebsd
- runner: macos-15
goos: darwin
# FIXME: this is currently failing in a nonsensical way, so, running on linux instead...
# - runner: windows-2022
- runner: ubuntu-24.04
goos: windows
# Additionally lint for canary
- runner: ubuntu-24.04
goos: linux
canary: true
with:
timeout: 10
go-version: "1.26"
runner: ubuntu-24.04
# Note: in GitHub yaml world, if `matrix.canary` is undefined, and is passed to `inputs.canary`, the job
# will not run. However, if you test it, it will coerce to `false`, hence:
canary: ${{ matrix.canary && true || false }}
goos: ${{ matrix.goos }}
# Run common project checks (commits, licenses, etc)
lint-project-checks:
name: "project checks"
uses: ./.github/workflows/job-lint-project.yml
with:
timeout: 5
go-version: "1.26"
runner: ubuntu-24.04
# Lint for shell and yaml files
lint-other:
name: "other"
uses: ./.github/workflows/job-lint-other.yml
with:
timeout: 5
runner: ubuntu-24.04
# Verify we can actually build on all supported platforms, and a bunch of architectures
build-for-go:
name: "build for${{ inputs.hack }}"
uses: ./.github/workflows/job-build.yml
strategy:
fail-fast: false
matrix:
include:
- go-version: "1.26"
# Additionally build for canary
- go-version: "1.26"
canary: true
with:
timeout: 10
go-version: ${{ matrix.go-version }}
runner: ubuntu-24.04
canary: ${{ matrix.canary && true || false }}