-
Notifications
You must be signed in to change notification settings - Fork 193
43 lines (39 loc) · 1016 Bytes
/
ci.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
name: CI
on:
push:
branches: [ "master" ]
paths-ignore:
- 'docs/**'
- 'assets/**'
- '**/*.gitignore'
- '**/*.md'
pull_request:
branches: [ "master" ]
paths-ignore:
- 'docs/**'
- 'assets/**'
- '**/*.gitignore'
- '**/*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set up Go
uses: actions/setup-go@v3
with:
cache: false
go-version-file: go.mod
- name: Verify gofmt
run: |
make fmt && git add azure util cmd constant &&
git diff --cached --exit-code || (echo 'Please run "make fmt" to verify gofmt' && exit 1);
- name: Verify govet
run: |
make vet && git add azure util cmd constant &&
git diff --cached --exit-code || (echo 'Please run "make vet" to verify govet' && exit 1);
- name: Build
run: make build