Skip to content
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
cache: "npm"
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Run tests with coverage
run: npm run coverage
- name: Upload coverage to Codecov
Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ comment:
layout: "diff, flags, files"
behavior: default
require_changes: false
require_bundle_changes: false
require_base: false
require_head: true
hide_project_coverage: false

ignore:
- "app"
- "di"
Expand Down
8 changes: 8 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { withSentryConfig } from "@sentry/nextjs";
import { codecovWebpackPlugin } from "@codecov/webpack-plugin";
import webpack from "webpack";

/** @type {import('next').NextConfig} */
Expand All @@ -16,6 +17,13 @@ const nextConfig = {
}),
);
}
config.plugins.push(
codecovWebpackPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: "nextjs-clean-architecture",
uploadToken: process.env.CODECOV_TOKEN,
}),
);
return config;
},
};
Expand Down
74 changes: 74 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@codecov/webpack-plugin": "^0.0.1-beta.10",
"@types/better-sqlite3": "^7.6.11",
"@types/node": "^20",
"@types/react": "^18",
Expand Down