name: Tests on: pull_request: push: branches: - main workflow_dispatch: jobs: tests: name: Run tests runs-on: ubuntu-latest permissions: checks: write contents: read steps: - name: "build: checkout the latest changes" uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: "build: setup the node runtime" uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: cache: npm cache-dependency-path: package-lock.json node-version-file: .nvmrc - name: "build: install the required dependencies" run: npm ci - name: "unit(test): perform lints and formatting checks" run: npm run lint - name: "unit(test): perform check of typings" run: npm run check - name: "unit(test): perform unit test checks" run: npm test - name: "unit(test): upload coverage to CodeCov" uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: files: test/coverage.txt token: ${{ secrets.CODECOV_TOKEN }} - name: "build: package code for distribution" run: npm run build - name: "chore(health): check up on recent changes to the health score" uses: slackapi/slack-health-score@d58a419f15cdaff97e9aa7f09f95772830ab66f7 # v0.1.1 with: codecov_token: ${{ secrets.CODECOV_API_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }} extension: js include: src