From 5dc98b2424563e7d8cd3ad774d695b7cf2dc09db Mon Sep 17 00:00:00 2001 From: Fil Maj Date: Mon, 13 May 2024 20:36:03 +0000 Subject: [PATCH] Add codecov badge, report health score, update GH actions and code coverage reporting, tweak maintainer guide. (#99) --- .github/maintainers_guide.md | 2 +- .github/workflows/deno.yml | 15 ++++++++++++--- deno.jsonc | 3 ++- src/README.md | 2 ++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/maintainers_guide.md b/.github/maintainers_guide.md index 59b740f..bde4e96 100644 --- a/.github/maintainers_guide.md +++ b/.github/maintainers_guide.md @@ -39,7 +39,7 @@ deno task test You can also run a test coverage report with: ```zsh -deno task coverage +deno task test:coverage ``` ### Lint and format diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml index 827dbf1..d21f76c 100644 --- a/.github/workflows/deno.yml +++ b/.github/workflows/deno.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Setup repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Deno uses: denoland/setup-deno@v1 @@ -23,9 +23,18 @@ jobs: run: deno task test - name: Generate CodeCov-friendly coverage report - run: deno task coverage + run: deno task generate-lcov - name: Upload coverage to CodeCov - uses: codecov/codecov-action@v3.1.0 + uses: codecov/codecov-action@v4 with: file: ./lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Report health score + uses: slackapi/slack-health-score@v0 + with: + codecov_token: ${{ secrets.FILS_CODECOV_API_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + extension: ts + include: src diff --git a/deno.jsonc b/deno.jsonc index 1cdf1c5..79c5520 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -32,7 +32,8 @@ }, "tasks": { "test": "deno fmt --check && deno lint && deno test", - "coverage": "deno test --coverage=.coverage && deno coverage --exclude=fixtures --exclude=test --exclude=scripts --exclude=src/generated --lcov --output=lcov.info .coverage && deno run --allow-read https://deno.land/x/code_coverage@0.2.0/cli.ts" + "generate-lcov": "rm -rf .coverage && deno test --reporter=dot --coverage=.coverage && deno coverage --exclude=fixtures --exclude=test --exclude=scripts --exclude=src/generated --lcov --output=lcov.info .coverage", + "test:coverage": "deno task generate-lcov && deno coverage --exclude=fixtures --exclude=test --exclude=scripts --exclude=src/generated .coverage src" }, "lock": false } diff --git a/src/README.md b/src/README.md index 4b823f1..712fdf3 100644 --- a/src/README.md +++ b/src/README.md @@ -1,5 +1,7 @@ # deno-slack-api +[![codecov](https://codecov.io/gh/slackapi/deno-slack-api/graph/badge.svg?token=QKJCI23P5S)](https://codecov.io/gh/slackapi/deno-slack-api) + Slack API Client for Deno Run on Slack projects ```ts