Skip to content

Refactor config management #89

Refactor config management

Refactor config management #89

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Run Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
APP_ENV: cicd
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Copy test env file
run: |
cp .example.env .env
- name: Start containers
run: make compose-up
- name: Build goose migration tool
run: make build-goose
- name: Run DB migrations
run: /bin/bash scripts/goose.sh up
env:
APP_ENV: cicd
DB_CONNECTION: postgres
DB_URL: postgres://postgres:postgres@localhost:5432/bridge_test?sslmode=disable
- name: Run tests with coverage and race flag enabled
run: make test
- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down