Skip to content

Merge pull request #30 from realworld666/dependabot/npm_and_yarn/serv… #121

Merge pull request #30 from realworld666/dependabot/npm_and_yarn/serv…

Merge pull request #30 from realworld666/dependabot/npm_and_yarn/serv… #121

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 22.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: use cache
uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run build dev --if-present
- name: Run Tests
uses: w9jds/firebase-action@master
with:
args: emulators:exec \"cd server && pwd && npm run test\"
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Archive artifact
uses: actions/upload-artifact@master
with:
name: build
path: server/dist