Skip to content

Add ci

Add ci #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
DATABASE_URL: "postgresql://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@localhost:5432/fact?schema=public"
URL_DEV: "http://127.0.0.1"
PORT: 3000
services:
postgres:
image: postgres:10.3
env:
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
ports:
- 5432:5432
options: >-

Check failure on line 30 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 30, Col: 18): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.POSTGRES_USER
--health-cmd="pg_isready -U ${{ secrets.POSTGRES_USER }}"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: pnpm install
- name: Generate Prisma client
run: pnpm prisma generate
- name: Apply Prisma migrations
run: pnpm prisma migrate deploy
- name: Run tests
run: pnpm test