Skip to content

fix: ci action db env #81

fix: ci action db env

fix: ci action db env #81

Workflow file for this run

name: CI
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Typecheck
run: |
docker build --target=typecheck --no-cache .
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint check
run: |
docker build --target=lint --no-cache .
test:
runs-on: ubuntu-latest
services:
db:
image: postgres:latest
ports:
- 5432:5432
volumes:
- ./db-scripts:/docker-entrypoint-initdb.d/
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: acm_website
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 5
--health-start-period 15s
steps:
- uses: actions/checkout@v4
- name: Test
run: |
docker build --target=test --no-cache .
build:
needs: [typecheck, lint, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
docker build --target=run --no-cache .