Skip to content

Fix script for GitHub Actions #2

Fix script for GitHub Actions

Fix script for GitHub Actions #2

Workflow file for this run

name: ci-test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
name: Test the project
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12-alpine
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: secret
POSTGRES_DB: simple_bank
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
id: go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run migrations
run: make migrateup
- name: Test
run: make test