-
-
Notifications
You must be signed in to change notification settings - Fork 416
41 lines (33 loc) · 814 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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 */12 * * *'
jobs:
build-test:
name: "Build & Test"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: [ '1.22' ]
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Setup Go ${{ matrix.go }}"
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: "Download Deps"
run: go mod download -x
- name: "Check go.mod"
run: |
go mod tidy -v
git diff --name-only --exit-code go.mod || ( git diff && echo "Run go tidy to update go.mod" && false )
- name: "Build"
run: make build
- name: "Test"
run: make test