Skip to content

fix

fix #4

Workflow file for this run

name: Rust tests
on:
push:
branches:
- v3
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21.x' ]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
- name: Run migration
run: task db:test-migrate
env:
DATABASE_TEST_DSN: "host=localhost user=postgres password=root dbname=makoto_test port=5432 sslmode=disable"
- name: run tests
run: cargo test
env:
DATABASE_TEST_DSN: "host=localhost user=postgres password=root dbname=makoto_test port=5432 sslmode=disable"
DATABASE_TEST_URL: "postgres://postgres:postgres@localhost/postgres"