Run Deno Tests #58
This file contains hidden or 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: Run Deno Tests | |
on: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x # Run with latest stable Deno | |
# Check if the code is formatted according to Deno's default formatting conventions. | |
- name: deno fmt | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
deno fmt --check | |
# Scan the code for syntax errors and style issues. | |
- name: deno lint | |
run: deno lint | |
# Check the code/docs for type errors | |
- name: deno check | |
run: deno check --doc | |
# Run all test files in the repository and collect code coverage. | |
- name: deno test + coverage | |
run: deno test -A --coverage --coverage-raw-data-only -- ${{ secrets.PRIVATE_KEY }} --wait=5000 | |
# This generates a report from the collected coverage in `deno test --coverage`. | |
- name: Create coverage report | |
run: deno coverage --exclude=./tests --lcov --output=cov.lcov | |
- name: Upload coverage to Coveralls.io | |
uses: coverallsapp/github-action@v2 |