Skip to content

Cleans up the database before the tests #1073

Cleans up the database before the tests

Cleans up the database before the tests #1073

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
go: [1.20.x, 1.21.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ikalnytskyi/action-setup-postgres@v4
id: postgres
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- run: go test ./...
if: matrix.os == 'windows-latest'
env:
TEST_DATABASE_URL: ${{ steps.postgres.outputs.connection-uri }}
- run: go test --race ./...
if: matrix.os == 'ubuntu-latest'
env:
TEST_DATABASE_URL: ${{ steps.postgres.outputs.connection-uri }}