forked from Shpota/goxygen
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.18 KB
/
build.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
name: build
on: [push, pull_request]
jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '1.20'
id: go
- name: Build
run: go build .
- name: Test
run: go test -v . ./cli ./codegen
- name: Test Transformer
run: cd transform && go test ./...
- name: Check generated code is committed
run: |
go generate ./...
git diff --exit-code
- name: Lint
run: |
docker run -v $(pwd):/app -w /app golangci/golangci-lint:v1.24.0 \
golangci-lint run --config .github/.golangci.yml cli codegen static .
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: [ 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19 ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
id: go
- name: Build
run: go build .