name: firebase_functions

on:
  pull_request:
    paths:
      - "functions/**"
      - ".github/workflows/firebase_functions.yaml"

jobs:
  build:
    defaults:
      run:
        working-directory: ./functions
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: "14"
      - run: npm install
      - run: npm run lint
      - run: npm run build
      - run: npm run test:coverage
