-
Notifications
You must be signed in to change notification settings - Fork 24
46 lines (46 loc) · 1.4 KB
/
integration_tests.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
41
42
43
44
45
46
name: Integration tests
on:
push:
pull_request:
branches: [ main ]
jobs:
test:
strategy:
matrix:
go-version: [ 1.20.x ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: lndhub
POSTGRES_USER: user
POSTGRES_PASSWORD: password
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
rabbitmq:
image: rabbitmq:3.11.8
ports:
- 5672:5672
env:
RABBITMQ_DEFAULT_USER: "root"
RABBITMQ_DEFAULT_PASS: "password"
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests
run: go test -p 1 -v -covermode=atomic -coverprofile=coverage.out -cover -coverpkg=./... ./...
env:
RABBITMQ_URI: amqp://root:password@localhost:5672