feat: job system #63
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm i | |
- name: Prisma generate | |
run: npm run prisma-generate | |
- name: Run typecheck | |
run: npm run typecheck | |
- name: Run linter | |
run: npm run lint | |
- name: Start Docker services (PostgreSQL DB) | |
run: docker compose up -d | |
- name: Copy environment file and set test mode | |
run: cp .env.example .env && echo -en "\nTEST_MODE=true" >> .env | |
- name: Generate local keys | |
run: npm run local-keys | |
- name: Reset database | |
run: npm run db-reset | |
- name: Run tests | |
run: npm run test | |
- name: Stop Docker services | |
run: docker compose down |