Skip to content

Add funding structure question type and modal #557

Add funding structure question type and modal

Add funding structure question type and modal #557

Workflow file for this run

name: Test Backend Code
on:
push:
branches: ['main', 'staging', 'production']
pull_request:
branches: ['main', 'staging', 'production']
jobs:
test-backend:
name: Test Backend
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: backend
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5433:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true
- name: Install dependencies
run: go mod download
- name: Install Goose
run: go install github.com/pressly/goose/v3/cmd/[email protected]
- name: Run migrations
run: goose -dir .sqlc/migrations postgres "postgres://postgres:postgres@localhost:5433/postgres?sslmode=disable" up
- name: Run tests
run: |
# run tests and capture output
go test -v -coverprofile=coverage.out ./...
- name: Generate coverage report
if: ${{ !env.ACT && github.event_name == 'pull_request' && always() }}
run: go tool cover -html=coverage.out -o coverage.html
- name: Upload coverage report
if: ${{ !env.ACT && github.event_name == 'pull_request' && always() }}
uses: actions/upload-artifact@v4
with:
name: coverage-report-backend
path: backend/coverage.html