-
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.29 KB
/
node.js.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
51
52
name: Node.js CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
lint-and-build:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: client/pnpm-lock.yaml
- name: Set Firebase Credentials
run: |
echo "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}" | tr -d '\r' > firebase_service_account.json
echo "FIREBASE_SERVICE_ACCOUNT=$(cat firebase_service_account.json | base64 -w 0)" >> $GITHUB_ENV
- name: Install Dependencies
run: pnpm install --frozen-lockfile --reporter=silent
working-directory: client
- name: List Installed Node Modules
run: ls -la client/node_modules
- name: Run Lint
run: pnpm lint
working-directory: client
- name: Run Build
run: pnpm build
working-directory: client