Skip to content

Tweaks to get the acceptance tests running faster in environments wit… #192

Tweaks to get the acceptance tests running faster in environments wit…

Tweaks to get the acceptance tests running faster in environments wit… #192

Workflow file for this run

on:
- pull_request
env:
GO_VERSION: "1.20"
jobs:
tests:
runs-on: ubuntu-latest
name: Tests
## Setup
services:
postgres:
image: postgres:12.5
env:
POSTGRES_PASSWORD: secret
POSTGRES_DB: test
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--name test-postgres
ports:
- 5432:5432
steps:
- name: Increase postgres max_connections
run: |
docker exec -i test-postgres bash << EOF
sed -i -e 's/^max_connections = .*/max_connections = 500/' /var/lib/postgresql/data/postgresql.conf
EOF
docker restart --time 0 test-postgres
sleep 5
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: "Install Go ${{env.GO_VERSION}}"
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
with:
go-version: "${{env.GO_VERSION}}"
## Tests
- name: "make test"
env:
TMPDIR: "${{runner.temp}}"
GOPATH: "/home/runner/go"
GOBIN: "/home/runner/go/bin"
TEST_DATABASE_URL: postgresql://postgres:secret@localhost:5432/test?sslmode=disable
run: |
make test