-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 1.43 KB
/
ci.yaml
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: ci
on:
push:
branches:
- "main"
- "feat/**"
- "refactor/**"
- "fix/**"
pull_request:
branches:
- "main"
workflow_dispatch:
permissions: write-all
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
goversion:
- "1.23.0"
- "stable"
steps:
- uses: Kesin11/actions-timeline@v2
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goversion }}
cache: true
cache-dependency-path: go.sum
- name: Setup xc
uses: joerdav/[email protected]
- name: Setup deps
run: |
xc setup:deps
- name: Setup GOEXPERIMENT
working-directory: ./example
run: |
xc setup:goenv
- name: Setup filtgen
working-directory: ./example
run: |
xc install:local
- name: Go Generate
working-directory: ./example
run: |
go generate ./...
git diff --exit-code
- name: Run generated code
working-directory: ./example
run: |
go run ./main.go
- name: golangci-lint with reviedog
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: warning
golangci_lint_flags: "--config=.golangci.yaml"