-
-
Notifications
You must be signed in to change notification settings - Fork 430
40 lines (32 loc) · 809 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
name: CI
on:
push:
pull_request:
branches: [ master ]
schedule:
- cron: '0 3 * * *'
jobs:
build-test:
name: "Build & Test"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: [ 'stable', 'oldstable', '1.21' ]
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Go ${{ matrix.go }}"
uses: actions/setup-go@v5
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