-
-
Notifications
You must be signed in to change notification settings - Fork 35
47 lines (37 loc) · 975 Bytes
/
test.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
44
45
46
47
name: test
on: [push, pull_request]
env:
GOPROXY: https://proxy.golang.org,direct
jobs:
test:
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
redis-version: [5.x, 6.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis-version }}
auto-start: "false"
- name: Checkout code
uses: actions/checkout@v4
- name: Test
run: go test ./... -v -cover
- name: Data Race
run: go test ./... -race
golangci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54