chore(deps): update dependency @types/node to v22.10.2 #267
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 | |
on: push | |
jobs: | |
monorepo: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
env: | |
API_SERVER_PORT: 8080 | |
API_ORIGIN: http://localhost:8080 | |
API_BASE_PATH: /api | |
DATABASE_URL: postgresql://root:test@localhost:5432/test | |
TEST_DATABASE_URL: postgresql://root:test@localhost:5432/test | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: test | |
POSTGRES_USER: root | |
POSTGRES_DB: test | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- uses: actions/cache@v4 | |
id: root-npm-cache | |
with: | |
path: "node_modules" | |
key: client-npm-${{ hashFiles('package-lock.json') }} | |
- uses: actions/cache@v4 | |
id: client-npm-cache | |
with: | |
path: "frontend-web/node_modules" | |
key: client-npm-${{ hashFiles('frontend-web/package-lock.json') }} | |
- uses: actions/cache@v4 | |
id: server-npm-cache | |
with: | |
path: "backend-api/node_modules" | |
key: client-npm-${{ hashFiles('backend-api/package-lock.json') }} | |
- run: npm install | |
if: steps.root-npm-cache.outputs.cache-hit != 'true' | |
- run: npm install --prefix frontend-web | |
if: steps.client-npm-cache.outputs.cache-hit != 'true' | |
- run: npm install --prefix backend-api | |
if: steps.server-npm-cache.outputs.cache-hit != 'true' | |
- name: Execute frontend lint | |
run: npm run lint --prefix frontend-web | |
- name: Execute backend lint | |
run: npm run lint --prefix backend-api | |
- name: Setup DB | |
run: | | |
sudo systemctl start postgresql.service | |
- run: npm run generate | |
- run: npm run typecheck | |
- name: Test | |
run: | | |
export NODE_OPTIONS="--max_old_space_size=4000" | |
cd backend-api | |
npm run migrate:dev | |
npm run test | |
env: | |
API_JWT_SECRET: test_secret |