Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci-packages.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI (packages)

on:
push:
# Keep running on main so octocov can refresh the baseline artifact that PRs diff against.
branches:
- main
pull_request:

concurrency:
Expand All @@ -12,10 +16,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
actions: write
contents: read
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 2
persist-credentials: false
- uses: ./.github/actions/ci
- uses: k1LoW/octocov-action@a167dc0dee441b7ffc45e1b862ab55ec0d87f278 # v1.5.2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist
.cursor/
.claude/
.pnpm-store
coverage
18 changes: 18 additions & 0 deletions .octocov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
coverage:
paths:
- packages/core/coverage/lcov.info
comment:
if: is_pull_request
updatePrevious: true
hideFooterLink: true
summary:
if: true
hideFooterLink: true
report:
if: is_default_branch
datastores:
- artifact://${GITHUB_REPOSITORY}/packages-core-octocov
diff:
if: is_pull_request
datastores:
- artifact://${GITHUB_REPOSITORY}/packages-core-octocov
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitejs/plugin-react": "catalog:",
"@vitest/coverage-v8": "4.1.10",
"happy-dom": "20.9.0",
"postcss": "8.5.26",
"react": "catalog:",
Expand Down
8 changes: 8 additions & 0 deletions packages/core/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ import path from "node:path";
import { defineConfig } from "vitest/config";
import tsconfigPaths from "vite-tsconfig-paths";

const coverageEnabled = process.env.CI === "true";

export default defineConfig({
plugins: [tsconfigPaths()],
test: {
environment: "happy-dom",
typecheck: {
enabled: true,
},
coverage: {
enabled: coverageEnabled,
provider: "v8",
reporter: ["lcov", "text-summary"],
reportsDirectory: "coverage",
},
resolveSnapshotPath: (testPath, snapExtension) => {
const relativePath = path.relative(__dirname, testPath);
const snapshotName = relativePath.replaceAll(path.sep, "__");
Expand Down
Loading
Loading