-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (42 loc) Β· 1.1 KB
/
lint_and_unit_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Lint and Unit Test
on:
push:
branches:
- "**"
jobs:
lint_and_unit_test:
name: Lint and Unit Test
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: true
# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
# Run build
- name: Install dependencies and build packages
run: |
pnpm install --frozen-lockfile
pnpm --filter @noctaCrdt build
pnpm --filter server build
# Run lint
- name: Run Lint
run: pnpm eslint .
# Run Unit tests
- name: Run Unit Tests
run: pnpm test
env:
NODE_ENV: development
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_REFRESH_SECRET: ${{ secrets.JWT_REFRESH_SECRET }}
VITE_API_URL: ${{ secrets.VITE_API_URL }}