Skip to content

Commit

Permalink
feat: add coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
zr87 committed Aug 11, 2024
1 parent e7cbfe7 commit 44c2fe8
Show file tree
Hide file tree
Showing 7 changed files with 344 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests & Coverage

on:
push:
branches: [main, next]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run tests with coverage
run: pnpm run coverage

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
*.iml
node_modules
node_modules
coverage/
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default } from "./src/accentFolding.js";
/* v8 ignore next 1 */
export { default } from "./src/accentFolding.js";
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
},
"type": "module",
"scripts": {
"test": "vitest",
"coverage": "vitest run --coverage",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"semantic-release": "semantic-release"
"semantic-release": "semantic-release",
"test": "vitest"
},
"repository": {
"type": "git",
Expand All @@ -29,7 +30,9 @@
},
"homepage": "https://github.com/zr87/accent-folding#readme",
"devDependencies": {
"@vitest/coverage-v8": "^2.0.5",
"eslint": "^9.9.0",
"install": "^0.13.0",
"semantic-release": "^24.0.0",
"vitest": "^2.0.5"
}
Expand Down
Loading

0 comments on commit 44c2fe8

Please sign in to comment.