name: PR test

on:
  # Triggers the workflow on push or pull request events but only for the dev branch
  - pull-request
  - push
  # Allows you to run this workflow manually from the Actions tab
  - workflow_dispatch

jobs:
  deps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - name: Cache Node.js modules
        uses: actions/cache@v2
        with:
          # npm cache files are stored in `~/.npm` on Linux/macOS
          # https://docs.github.com/en/actions/guides/building-and-testing-nodejs
          path: ~/.npm
          key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.OS }}-node-
            ${{ runner.OS }}-
      - run: npm ci
      - run: npm run lint
      - run: npm run i18n:validate
      - run: npm run cofactsapi
      - run: npm run test -- --coverage
      - name: Update coveralls
        run: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

name: PR test

on:
  # Triggers the workflow on push or pull request events but only for the dev branch
  - pull_request
  - push
  # Allows you to run this workflow manually from the Actions tab
  - workflow_dispatch

jobs:
  deps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - name: Cache Node.js modules
        uses: actions/cache@v2
        with:
          # npm cache files are stored in `~/.npm` on Linux/macOS
          # https://docs.github.com/en/actions/guides/building-and-testing-nodejs
          path: ~/.npm
          key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.OS }}-node-
            ${{ runner.OS }}-
      - run: npm ci
      - run: npm run lint
      - run: npm run i18n:validate
      - run: npm run cofactsapi
      - run: npm run test -- --coverage
      - name: Update coveralls
        run: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

Fix pull request key in workflow
Fix pull request key in workflow
