-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (49 loc) · 1.26 KB
/
pr.yml
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
---
name: CI
on:
push:
tags:
- v*
branches:
- main
pull_request:
jobs:
code-health:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807
- name: lint
uses: golangci/[email protected]
with:
version: v1.57.1
args: --timeout=10m
- name: tests
run: make test
- name: example-tests
run: make test-examples
build:
needs: code-health # only run if code-health passes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: ./tools/package-lock.json
- working-directory: ./tools
run: |
npm install
npm run ci
- run: go install golang.org/x/tools/cmd/[email protected]
- working-directory: ./tools
run: |
export PATH=${PATH}:`go env GOPATH`/bin
make clean_and_generate
- name: Fail when generate introducing diff
run: |
git diff --exit-code