# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Pull Request checks

on:
  pull_request:
    branches: 
      - master
    paths-ignore:
      - '**.md'
      - '**.yml'

jobs:
  build_and_test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 12
          registry-url: https://registry.npmjs.org
      - name: Install Dependencies 
        run: npm install
      - name: Run audit
        run: npm run audit
      - name: Compile Typescript
        run: npm run-script build
      - name: Run test with coverage
        run: npm run-script coverage

