-
Notifications
You must be signed in to change notification settings - Fork 9
116 lines (95 loc) · 2.58 KB
/
ci.yml
File metadata and controls
116 lines (95 loc) · 2.58 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Build
run: CGO_ENABLED=0 go build ./...
- name: Test
run: CGO_ENABLED=0 go test -v ./...
env:
CTX_SKIP_PATH_CHECK: "1"
- name: Vet
run: CGO_ENABLED=0 go vet ./...
dco:
name: DCO
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Get PR commits
id: get-pr-commits
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check DCO sign-off
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11.4
args: --timeout=5m
typecheck-opencode-plugin:
name: Typecheck OpenCode plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tools/typecheck/opencode/package-lock.json
- name: Install dependencies
working-directory: tools/typecheck/opencode
run: npm ci
- name: Type-check embedded plugin
working-directory: tools/typecheck/opencode
run: npx tsc --noEmit
vscode-extension:
name: VS Code extension build + typecheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: editors/vscode/package-lock.json
- name: Install dependencies
working-directory: editors/vscode
run: npm ci
- name: Bundle (esbuild)
working-directory: editors/vscode
run: npm run build
- name: Type-check production code
working-directory: editors/vscode
run: npx tsc --noEmit -p tsconfig.ci.json