Skip to content

Commit

Permalink
chore(codspeed): apply basic setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Baek2back committed Aug 1, 2024
1 parent 0c02718 commit 706800f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: codspeed

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

jobs:
codspeed:
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
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
run: bun run bench
token: ${{ secrets.CODSPEED_TOKEN }}
Binary file modified bun.lockb
Binary file not shown.
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",
"bench": "turbo run bench",
"coverage": "turbo run coverage",
"changeset": "changeset",
"version-packages": "changeset version",
Expand Down
5 changes: 3 additions & 2 deletions packages/python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
"test": "vitest",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"bench": "vitest bench"
"bench": "vitest bench --run"
},
"devDependencies": {
"typescript": "5.5.4",
"vitest": "2.0.5",
"tsup": "8.2.3",
"@microsoft/api-extractor": "7.47.4",
"@tsconfig/bun": "1.0.7",
"@vitest/coverage-v8": "2.0.5"
"@vitest/coverage-v8": "2.0.5",
"@codspeed/vitest-plugin": "3.1.1"
}
}
5 changes: 5 additions & 0 deletions packages/python/src/built-in/iter.bench.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { bench, describe } from "vitest";

describe("iter", () => {
bench.todo("unimplemented test");
});
2 changes: 2 additions & 0 deletions packages/python/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import codspeedPlugin from "@codspeed/vitest-plugin";
import { defineConfig } from "vitest/config";

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

0 comments on commit 706800f

Please sign in to comment.