-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.33 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
46
47
48
49
50
51
52
53
54
55
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.24
ports:
- "3306:3306"
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: test_outbox
postgres:
image: postgres:13.2-alpine
ports:
- "5432:5432"
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: test_outbox
rabbit:
image: 'rabbitmq:3.8.9-management-alpine'
ports:
- "5672:5672"
sqs:
image: 'localstack/localstack'
ports:
- "4566:4566"
env:
SERVICES: sqs
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.23
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -race ./...
env:
MINE_INTERVAL: 1s
MYSQL_URI: user:password@tcp(localhost:3306)/test_outbox
PG_URI: postgres://postgres:password@localhost:5432/test_outbox?sslmode=disable
RABBITMQ_URI: amqp://guest:guest@localhost:5672
SQS_URI: http://localhost:4566