-
-
Notifications
You must be signed in to change notification settings - Fork 372
63 lines (61 loc) · 1.61 KB
/
pr_test-matrix.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Unit & Integration Tests
on: [ pull_request ]
jobs:
linux-matrix:
strategy:
matrix:
go: [ "1.22", "1.23" ]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:12-alpine
env:
POSTGRES_PASSWORD: example
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "5432:5432"
mq:
image: rabbitmq:3-management
ports:
- 5672:5672
- 15672:15672
env:
ALLOW_ANONYMOUS_LOGIN: "yes"
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Test
run: TEST_DB=1 TEST_MQ=1 go test ./...
timeout-minutes: 5
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TESTING_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TESTING_AWS_SECRET_KEY }}
- name: Build
run: go build -v ./...
windows-matrix:
strategy:
matrix:
go: [ "1.22", "1.23" ]
os: [ windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Test
run: go test ./...
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TESTING_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TESTING_AWS_SECRET_KEY }}
- name: Build
run: go build -v ./...