Skip to content

GitHub builds

GitHub builds #6

Workflow file for this run

name: Test Package
on:
pull_request:
jobs:
run-tests:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
- run: npm install
- run: npm run test
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-results/junit.xml
- name: Generate code coverage
id: code-coverage
uses: barecheck/code-coverage-action@v1
with:
barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
lcov-file: "./test-results/coverage/lcov.info"
send-summary-comment: true
show-annotations: "warning"