-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (74 loc) · 2.84 KB
/
Copy pathci.yml
File metadata and controls
85 lines (74 loc) · 2.84 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
79
80
81
82
83
84
85
name: CI
on:
pull_request:
branches:
- master
- main
push:
branches:
- master
- main
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: read
env:
# Never auto-download a Go toolchain other than the mise-pinned one
# (mise [env] is not carried by the action's shims, so set it on the job).
GOTOOLCHAIN: local
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Setup mise
uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
with:
version: 2026.6.14
cache: true
# Installs every tool from mise.toml honoring mise.lock (locked → fail
# closed), including moon, and prepends the shim dir to PATH.
- name: Resolve uv cache directory
id: uv-cache
run: echo "dir=$(uv cache dir)" >> "$GITHUB_OUTPUT"
- name: Cache Go modules
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: Cache Go build artifacts
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('mise.lock', 'go.sum') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-go-build-${{ hashFiles('mise.lock', 'go.sum') }}-
${{ runner.os }}-go-build-
- name: Cache golangci-lint
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/golangci-lint
key: ${{ runner.os }}-golangci-lint-${{ hashFiles('mise.lock', '.golangci.yml', 'go.sum') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-golangci-lint-${{ hashFiles('mise.lock', '.golangci.yml', 'go.sum') }}-
${{ runner.os }}-golangci-lint-
- name: Cache uv downloads
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.uv-cache.outputs.dir }}
key: ${{ runner.os }}-uv-docs-${{ hashFiles('docs/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-docs-
# Single CI gate. `root:check` fans out to format, lint, build, the MCP
# transport smoke test (root:mcp-smoke), the race-detector suite
# (root:race), and the docs build.
- name: Run Moon CI (root:check — includes MCP smoke and race)
run: moon ci --summary minimal