-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (62 loc) · 1.52 KB
/
Copy pathci.yml
File metadata and controls
72 lines (62 loc) · 1.52 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
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
commitlint:
name: commitlint
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22.14.0'
cache: npm
- name: Install commit tooling
run: npm ci
- name: Lint commits
shell: bash
run: |
git fetch --no-tags --prune --unshallow || true
base=$(git merge-base origin/main HEAD || echo HEAD~20)
npx --no-install commitlint --from="$base" --to=HEAD
test:
name: test (${{ matrix.name }})
needs: commitlint
runs-on: ${{ matrix.runner }}
env:
CGO_ENABLED: "0"
strategy:
fail-fast: false
matrix:
include:
- name: linux-amd64
runner: ubuntu-24.04
- name: linux-arm64
runner: ubuntu-24.04-arm
- name: windows-amd64
runner: windows-2025
- name: windows-arm64
runner: windows-11-arm
- name: darwin-amd64
runner: macos-15-intel
- name: darwin-arm64
runner: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.x'
cache: true
- name: Test
run: go test ./...
- name: Build
run: go build ./...