name: Tests on: pull_request: push: branches: - main workflow_dispatch: jobs: tests: name: Run unit tests runs-on: ubuntu-latest permissions: checks: write contents: read steps: - name: "build: checkout the latest changes" uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: "build: setup the node runtime" uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.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@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 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