Skip to content

republish invoices cmd #125

republish invoices cmd

republish invoices cmd #125

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: ln-event-publisher-test
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 -cover -coverpkg=./... ./...
env:
RABBITMQ_URI: amqp://root:password@localhost:5672
DATABASE_URI: postgresql://user:password@localhost:5432/ln-event-publisher-test?sslmode=disable