(add) GitHub Continuous Integration (CI) workflows ⚙️ #4
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
# 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 @pnpm-lock.yaml file. | |
# | |
name: Node.js CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
lint-and-build: | |
runs-on: ubuntu-latest | |
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" | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
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 |