-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 958 Bytes
/
test.yaml
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
on: [push, pull_request]
name: Test
jobs:
test:
services:
etcd:
image: gcr.io/etcd-development/etcd:v3.5.0
ports:
- 2379:2379
env:
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
strategy:
matrix:
go-version: [1.19.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Vet
run: "go vet ./..."
- name: Install Staticcheck
uses: dominikh/[email protected]
with:
version: "2022.1.1"
install-go: false
cache-key: ${{ matrix.go-version }}
- name: Staticcheck
run: "staticcheck ./..."
- name: Test
run: "go test ./..."