Skip to content

(add) GitHub Continuous Integration (CI) workflows ⚙️ #14

(add) GitHub Continuous Integration (CI) workflows ⚙️

(add) GitHub Continuous Integration (CI) workflows ⚙️ #14

Workflow file for this run

# This file builds and runs the Node server for the client using pnpm.
# Checks to ensure successful compile, lint, and run.
#
# The versioning is locked in the client folder. See @client/pnpm-lock.yaml file.
#
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 }}' | jq -c . > firebase_service_account.json
env:
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
- name: Install Dependencies
run: timeout 300s 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