Skip to content

gotta not be react dummy #22

gotta not be react dummy

gotta not be react dummy #22

Workflow file for this run

name: Test Suite
on:
pull_request:
branches: [ main, master ]
jobs:
test-api:
name: API Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: chips_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci --workspace=@chips/api
- name: Generate Prisma Client
run: npx prisma generate
working-directory: packages/api
- name: Run migrations
run: npx prisma migrate deploy
working-directory: packages/api
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chips_test
- name: Run tests
run: npm test --workspace=@chips/api
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chips_test
NODE_ENV: test
lint-web:
name: Web Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci --workspace=@chips/web
- name: Run linter
run: npm run lint --workspace=@chips/web
build:
name: Build Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install root dependencies
run: npm ci
- name: Build API
run: npm run build --workspace=@chips/api
working-directory: packages/api
- name: Build Web
run: npm run build --workspace=@chips/web
env:
VITE_API_URL: http://localhost:3000