Skip to content

Commit f33c9b4

Browse files
committed
chore(ci): split workflows
1 parent 9c3d572 commit f33c9b4

File tree

2 files changed

+34
-24
lines changed

2 files changed

+34
-24
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
branches:
55
- "main"
66
pull_request:
7+
workflow_dispatch:
8+
79
jobs:
810
check:
911
runs-on: "ubuntu-latest"
@@ -20,30 +22,6 @@ jobs:
2022
- run: pnpm install --frozen-lockfile --prefer-offline
2123
- run: pnpm moon check --all
2224

23-
codspeed:
24-
runs-on: "ubuntu-latest"
25-
steps:
26-
- uses: "actions/checkout@v3"
27-
with:
28-
fetch-depth: 0
29-
- run: sudo apt-get install -y valgrind
30-
- uses: pnpm/action-setup@v2
31-
- uses: actions/setup-node@v3
32-
with:
33-
cache: pnpm
34-
node-version-file: .nvmrc
35-
- run: pnpm install --frozen-lockfile --prefer-offline
36-
- run: pnpm moon run :build
37-
38-
- name: Run benchmarks
39-
# use version from `main` branch to always test the latest version, in real projects, use a tag, like `@v1`
40-
uses: CodSpeedHQ/action@main
41-
with:
42-
run: |
43-
pnpm moon run --concurrency 1 :bench
44-
pnpm --workspace-concurrency 1 -r bench-tinybench
45-
pnpm --workspace-concurrency 1 -r bench-benchmark-js
46-
4725
list-examples:
4826
runs-on: "ubuntu-latest"
4927
name: List examples

.github/workflows/codspeed.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "CI"
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
codspeed:
11+
runs-on: "ubuntu-latest"
12+
steps:
13+
- uses: "actions/checkout@v3"
14+
with:
15+
fetch-depth: 0
16+
- run: sudo apt-get install -y valgrind
17+
- uses: pnpm/action-setup@v2
18+
- uses: actions/setup-node@v3
19+
with:
20+
cache: pnpm
21+
node-version-file: .nvmrc
22+
- run: pnpm install --frozen-lockfile --prefer-offline
23+
- run: pnpm moon run :build
24+
25+
- name: Run benchmarks
26+
# use version from `main` branch to always test the latest version, in real projects, use a tag, like `@v1`
27+
uses: CodSpeedHQ/action@main
28+
with:
29+
run: |
30+
pnpm moon run --concurrency 1 :bench
31+
pnpm --workspace-concurrency 1 -r bench-tinybench
32+
pnpm --workspace-concurrency 1 -r bench-benchmark-js

0 commit comments

Comments
 (0)