Skip to content

Fix eslint warnings #40

Fix eslint warnings

Fix eslint warnings #40

Workflow file for this run

name: Tests
on: [ push ]
jobs:
unit:
name: Unit tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- run: npm i
- name: Prebuild files
run: npm run test:prebuild
- name: Run ava unit tests
run: npm run test:ava
coverage:
name: Code coverage
runs-on: ubuntu-latest
strategy:
fail-fast: true
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- run: npm i
- name: Prebuild files
run: npm run test:prebuild
- name: Run c8 coverage
run: |
echo "LINE_COVERAGE=$(npm run coverage:test:ava | grep -E '^\s*Lines\s*:\s*[0-9]+(\.[0-9]+)?%' | awk '{print $3}' | tr -d '%')" >> $GITHUB_ENV
- name: Update coverage badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 615b7906cd71effb447c4b08673d2cb6
filename: latch-coverage.json
label: Coverage
message: ${{ env.LINE_COVERAGE }}
valColorRange: ${{ env.LINE_COVERAGE }}
maxColorRange: 100
minColorRange: 0