Add funding structure question type and modal #558
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |