Improve jsdocs / add PR coverage report #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build - CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check-access: | |
runs-on: ubuntu-latest | |
outputs: | |
has-token-access: ${{ steps.check.outputs.has-token-access }} | |
steps: | |
- id: check | |
run: | | |
echo "has-token-access=$(if [[ '${{ github.event.pull_request.head.repo.fork }}' != 'true' && '${{ github.actor }}' != 'dependabot[bot]' ]]; then echo 'true'; else echo 'false'; fi)" >> $GITHUB_OUTPUT | |
install-deps: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/configure-nodejs | |
with: | |
lookup-only: 'true' # We only want to lookup from the cache - if a hit, this job does nothing | |
build: | |
needs: | |
- install-deps | |
- check-access | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/configure-nodejs | |
- name: Build | |
run: npm run build | |
- name: Build Docs | |
run: npm run build:docs | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm run test | |
- name: Upload code coverage | |
if: github.event_name == 'pull_request' && needs.check-access.outputs.has-token-access == 'true' | |
uses: ./.github/actions/coverage-report | |
with: | |
lcov-file: coverage/lcov.info | |
title: Node.js Code Coverage Report |