Update README.md #240
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: Automate the collection of coverage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
test: | |
name: Collection of coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Deno runtime | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.28.2 | |
- name: Check format | |
run: deno fmt --check | |
- name: Do lint | |
run: deno lint | |
- name: Check type | |
run: deno check $(find . -regex '.*\.\(js\|ts\|jsx\|tsx\|mjs\|mjsx\)' -printf '%p ') | |
- name: Test and collect coverage | |
run: deno test -A --coverage=tests/coverage | |
- name: Create coverage report | |
run: deno coverage ./tests/coverage --lcov > tests/coverage.lcov | |
- name: Upload to codecov | |
uses: codecov/codecov-action@v3.1.0 | |
with: | |
file: ./tests/coverage.lcov | |
fail_ci_if_error: true |