diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..73f306c --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,32 @@ +name: Pull Request Tests + +on: + pull_request: + branches: [ '*' ] + types: + - opened + - synchronize + +jobs: + run-tests: + runs-on: ubuntu-latest + env: + working-directory: ./.github/scripts + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14' + check-latest: true + cache: 'npm' + cache-dependency-path: ${{ env.working-directory }}/package-lock.json + - run: npm ci + working-directory: ${{ env.working-directory }} + - run: npm test + working-directory: ${{ env.working-directory }} + - uses: tintef/nyc-reporter-action@0.2.5 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SKIP_COVERAGE_FOLDER: true + WORKING_DIRECTORY: ${{ env.working-directory }} \ No newline at end of file