Skip to content

Commit

Permalink
Merge pull request #3 from hyperse-io/feat/vitest-reporter
Browse files Browse the repository at this point in the history
chore: updates
  • Loading branch information
tianyingchun authored Aug 13, 2024
2 parents 73aa9e2 + 539a22f commit 653d157
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage-badge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: yarn test:coverage

- name: generate badges
run: yarn generate-coverage-report:badges
run: yarn generate-coverage-badges

- name: push coverage artifacts to another branch
uses: peaceiris/actions-gh-pages@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: rm -rf node_modules

- name: "PR Test Reports"
uses: hyperse-io/vitest-coverage-reporter@v1.0.12
uses: hyperse-io/vitest-coverage-reporter@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
include-all-projects: "false"
Expand Down
1 change: 0 additions & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit "$1"
4 changes: 3 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run test:coverage
yarn generate-coverage-report --type readme
git add .
yarn lint-staged-files --debug

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@
<table> <thead> <tr> <th align="center">Status</th> <th align="left">Category</th> <th align="right">Percentage</th> <th align="right">Covered / Total</th> </tr> </thead> <tbody> <tr> <td align="center">🔵</td> <td align="left">Lines</td> <td align="right">75%</td> <td align="right">6 / 8</td> </tr> <tr> <td align="center">🔵</td> <td align="left">Statements</td> <td align="right">75%</td> <td align="right">6 / 8</td> </tr> <tr> <td align="center">🔵</td> <td align="left">Functions</td> <td align="right">75%</td> <td align="right">3 / 4</td> </tr> <tr> <td align="center">🔵</td> <td align="left">Branches</td> <td align="right">75%</td> <td align="right">3 / 4</td> </tr> </tbody> </table>

The starter template for running Github Pages with docusaurus for document

## references

* https://github.com/peaceiris/actions-gh-pages
17 changes: 10 additions & 7 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { base, defineConfig } from '@hyperse/eslint-config-hyperse';

export default defineConfig([
...base,
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
export default defineConfig(
[
...base,
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
},
]);
],
['**/coverage']
);
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"build": "rimraf dist && tsc -p ./tsconfig.build.json",
"changeset": "changeset",
"cz": "cz",
"generate-coverage-report:badges": "yarn run test:coverage && generate-coverage-report --type badges",
"generate-coverage-report:readme": "yarn run test:coverage && generate-coverage-report --type readme",
"generate-coverage-badges": "yarn run test:coverage && generate-coverage-report --type badges",
"lint": "eslint .",
"lint-fix": "yarn lint --fix",
"lint-staged-files": "lint-staged --allow-empty",
Expand All @@ -63,7 +62,7 @@
"@commitlint/cli": "19.4.0",
"@commitlint/config-conventional": "19.2.2",
"@hyperse/eslint-config-hyperse": "^1.1.3",
"@hyperse/vitest-coverage-reporter": "^1.0.12",
"@hyperse/vitest-coverage-reporter": "^1.0.15",
"@types/node": "^22.2.0",
"@vitest/coverage-istanbul": "^2.0.5",
"cheerio": "^1.0.0",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3063,7 +3063,7 @@ __metadata:
"@commitlint/cli": "npm:19.4.0"
"@commitlint/config-conventional": "npm:19.2.2"
"@hyperse/eslint-config-hyperse": "npm:^1.1.3"
"@hyperse/vitest-coverage-reporter": "npm:^1.0.12"
"@hyperse/vitest-coverage-reporter": "npm:^1.0.15"
"@types/node": "npm:^22.2.0"
"@vitest/coverage-istanbul": "npm:^2.0.5"
cheerio: "npm:^1.0.0"
Expand All @@ -3078,9 +3078,9 @@ __metadata:
languageName: unknown
linkType: soft

"@hyperse/vitest-coverage-reporter@npm:^1.0.12":
version: 1.0.12
resolution: "@hyperse/vitest-coverage-reporter@npm:1.0.12"
"@hyperse/vitest-coverage-reporter@npm:^1.0.15":
version: 1.0.15
resolution: "@hyperse/vitest-coverage-reporter@npm:1.0.15"
dependencies:
"@actions/core": "npm:1.10.1"
"@actions/github": "npm:6.0.0"
Expand All @@ -3093,7 +3093,7 @@ __metadata:
unified: "npm:^11.0.5"
bin:
generate-coverage-report: bin/generate-coverage-report.mjs
checksum: 10/515b95bbd2ae4e8c9f4ec45a56e34c756acdcea9467c8830666f05f99687984c54831b0e745daa0b30ed69ff277d3dd28c9be3917aa8c15708739a5d6f670417
checksum: 10/44768f2c1b6cae30830eebb4647b7af4c38455f37d6b6802b5e0136cbe37f77c82aa8ae3c2da65218068a20d4010f07817caa22b6b373ab9bd4f6d511b6dcbf9
languageName: node
linkType: hard

Expand Down

0 comments on commit 653d157

Please sign in to comment.