-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (35 loc) · 1.07 KB
/
go.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
name: Go
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
go-version: [1.21]
redis-version: [5, 6]
steps:
- uses: actions/checkout@v3
- name: Start Redis (NOTICE THIS STEP ONLY SUPPORTS LINUX)
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: setup envs on Windows
if: runner.os == 'Windows'
run: echo "GMQ_RDS=$env:redis://localhost:6379/14?dial_timeout=1s&read_timeout=1s&max_retries=1" >> $env:GITHUB_ENV
- name: setup envs on Unixlike
if: runner.os != 'Windows'
run: echo "GMQ_RDS=redis://localhost:6379/14?dial_timeout=1s&read_timeout=1s&max_retries=1" >> $GITHUB_ENV
- name: Test
run: go test -v ./...