(add) GitHub Continuous Integration (CI) workflows ⚙️ #9
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: 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 }}" | base64 > firebase_service_account.json | |
echo "FIREBASE_SERVICE_ACCOUNT=$(cat firebase_service_account.json)" >> $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 |