-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (36 loc) · 783 Bytes
/
test.yml
File metadata and controls
45 lines (36 loc) · 783 Bytes
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
name: Test
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
jobs:
checks:
name: Workspace Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Lint
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Tidy
run: |
go mod tidy
if [[ -n $(git status -s) ]]; then exit 1; fi
test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Vet
run: go vet ./...
- name: Test
run: go test ./...