chore: add hot-hook for hmr #179
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: | |
workflow_dispatch: | |
jobs: | |
code_style: | |
name: Prettier Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Prettier Check | |
run: pnpm run prettier:check | |
type_check: | |
name: Type Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Type Check | |
run: pnpm run typecheck | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm run lint | |
build_backend: | |
name: Build Backend | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Backend | |
run: pnpm --filter backend build | |
build_frontend: | |
name: Build Frontend | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Frontend | |
env: | |
NEXT_PUBLIC_API_URL: https://staging.api.boklisten.no/ | |
NEXT_PUBLIC_BL_WEB_URL: https://staging.boklisten.no/ | |
NEXT_PUBLIC_BL_ADMIN_URL: https://staging.bladmin.boklisten.no/ | |
run: pnpm --filter frontend build | |
test_backend: | |
name: Test Backend | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Test Backend | |
run: pnpm --filter backend test |