Skip to content

Commit

Permalink
Test: change test config and setup test CI workflow
Browse files Browse the repository at this point in the history
Chore: update deps
  • Loading branch information
CNSeniorious000 committed Jan 30, 2024
1 parent c479f95 commit 2705259
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 5 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test & export coverage report

on: ["push", "pull_request", "workflow_dispatch"]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
test:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun i vitest @vitest/coverage-istanbul --no-save --no-lock
- name: Run vitest
run: bun run coverage
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
path: coverage
name: "."
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"test:ui": "vitest --ui"
},
"devDependencies": {
"@vitest/coverage-v8": "^0.34.6",
"@vitest/ui": "^0.34.6",
"esbuild": "^0.19.5",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
"@vitest/coverage-istanbul": "^1.2.2",
"@vitest/ui": "^1.2.2",
"esbuild": "^0.20.0",
"typescript": "^5.3.3",
"vitest": "^1.2.2"
}
}
9 changes: 9 additions & 0 deletions vitest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "vitest/config"

export default defineConfig({
test: {
coverage: {
provider: "istanbul",
},
},
})

1 comment on commit 2705259

@vercel
Copy link

@vercel vercel bot commented on 2705259 Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.