-
Notifications
You must be signed in to change notification settings - Fork 211
71 lines (60 loc) · 1.52 KB
/
test.yml
File metadata and controls
71 lines (60 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
name: test
on:
push:
branches:
- master
paths:
- "cmd/**"
- "internal/**"
- "pkg/**"
- "go.mod"
- "go.sum"
- "Makefile"
- ".github/workflows/test.yml"
pull_request:
branches:
- master
paths:
- "cmd/**"
- "internal/**"
- "pkg/**"
- "go.mod"
- "go.sum"
- "Makefile"
- ".github/workflows/test.yml"
concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26.1"
cache: true
- name: Set up Bun
# Pinned to match the bun version that produced bun.lock;
# `bun install --frozen-lockfile` is sensitive to bun-major drift.
# Bump together with the local dev environment.
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.2.21"
- name: build SPA
# Must run before lint/test/build: //go:embed all:webui/dist
# is type-checked by golangci-lint (and resolved by `go build`),
# so the dist tree has to exist on disk before any Go tool runs.
run: make ui
- name: tidy
run: make tidy
- name: lint
run: make lint
- name: test
run: make test
- name: build
run: make build