Repository navigation
82 lines (71 loc) · 2.61 KB
/
Copy pathci.yml
File metadata and controls
82 lines (71 loc) · 2.61 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
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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup mise
uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
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@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
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@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
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@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
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@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ steps.uv-cache.outputs.dir }}
key: ${{ runner.os }}-uv-docs-${{ hashFiles('docs/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-docs-
- name: Run Moon CI
run: moon ci --summary minimal