Skip to content

build: make nix shell as development environment #451

build: make nix shell as development environment

build: make nix shell as development environment #451

Workflow file for this run

name: CI - Node
on:
push:
branches:
- "main"
- "development"
paths:
- "node/**"
- ".github/workflows/node.yml"
pull_request:
branches:
- "main"
- "development"
paths:
- "node/**"
- ".github/workflows/node.yml"
jobs:
build:
name: Build (Node v${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18', '20']
env:
FOLDER: node
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
cache-dependency-path: ${{ env.FOLDER }}/pnpm-lock.yaml
- name: Install dependencies
run: |
cd ${{ env.FOLDER }}
pnpm i
- name: Run linter
run: |
cd ${{ env.FOLDER }}
pnpm lint
- name: Run prettier
run: |
cd ${{ env.FOLDER }}
pnpm prettier
- name: Run build
run: |
cd ${{ env.FOLDER }}
pnpm build
- name: Run tests
run: |
cd ${{ env.FOLDER }}
cp .env.example .env
docker compose up -d
sleep 10s
pnpm migrate:up
pnpm seed:run
pnpm test
docker compose down -v