Skip to content

Commit

Permalink
Merge pull request #28 from Baek2back/settings/codecov
Browse files Browse the repository at this point in the history
ci(codecov): write actions for codecov
  • Loading branch information
Baek2back authored Aug 1, 2024
2 parents 4718002 + 52ed623 commit e5bd2ca
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: codecov

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]

jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: 20
- uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1
- run: bun install
- run: bun run coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Binary file modified bun.lockb
Binary file not shown.
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
patch: off
project:
default:
target: 100%
threshold: 10%

comment:
layout: 'header, reach, diff, flags, components'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"clean": "turbo run clean",
"test": "turbo run test",
"test:watch": "turbo run test:watch",
"coverage": "turbo run coverage",
"changeset": "changeset",
"version-packages": "changeset version",
"publish": "changeset publish",
Expand Down
5 changes: 4 additions & 1 deletion packages/python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@iter-x/python",
"version": "0.0.1",
"sideEffects": false,
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/Baek2back/iter-x",
Expand All @@ -12,13 +13,15 @@
"build": "tsup && api-extractor run --local --verbose",
"test": "vitest",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"bench": "vitest bench"
},
"devDependencies": {
"typescript": "5.5.4",
"vitest": "2.0.5",
"tsup": "8.2.3",
"@microsoft/api-extractor": "7.47.4",
"@tsconfig/bun": "1.0.7"
"@tsconfig/bun": "1.0.7",
"@vitest/coverage-v8": "2.0.5"
}
}
8 changes: 7 additions & 1 deletion packages/python/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { defineConfig } from "vitest/config";

export default defineConfig({});
export default defineConfig({
test: {
coverage: {
provider: "v8",
},
},
});
3 changes: 3 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"test:watch": {
"outputs": []
},
"coverage": {
"outputs": []
},
"dev": {
"persistent": true,
"cache": false
Expand Down

0 comments on commit e5bd2ca

Please sign in to comment.