Skip to content

Commit 3a955b9

Browse files
authored
Merge pull request #129 from jsr-core/refactoring
refactor: refine documents and benchmarks
2 parents 243dfc5 + 9e0b450 commit 3a955b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3514
-602
lines changed

.github/workflows/bench.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Benchmark
2+
3+
env:
4+
DENO_VERSION: 1.x
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*"
10+
workflow_dispatch:
11+
12+
jobs:
13+
bench:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: denoland/setup-deno@v1
18+
with:
19+
deno-version: ${{ env.DENO_VERSION }}
20+
- name: Cache
21+
run: |
22+
deno cache **/*.ts
23+
- name: Test
24+
run: |
25+
deno bench | tee bench.txt
26+
echo '# 🚀 Benchmarks' >> $GITHUB_STEP_SUMMARY
27+
echo '```' >> $GITHUB_STEP_SUMMARY
28+
cat bench.txt | npx strip-ansi-cli >> $GITHUB_STEP_SUMMARY
29+
echo '```' >> $GITHUB_STEP_SUMMARY
30+
timeout-minutes: 10

.github/workflows/test.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- main
1010
pull_request:
11+
workflow_dispatch:
1112

1213
jobs:
1314
check:
@@ -36,6 +37,10 @@ jobs:
3637
- uses: denoland/setup-deno@v1
3738
with:
3839
deno-version: ${{ env.DENO_VERSION }}
40+
- name: Cache
41+
run: |
42+
deno cache **/*.ts
43+
timeout-minutes: 5
3944
- name: Test
4045
run: |
4146
deno task test:coverage
@@ -48,18 +53,6 @@ jobs:
4853
files: ./coverage.lcov
4954
token: ${{ secrets.CODECOV_TOKEN }}
5055

51-
bench:
52-
runs-on: ubuntu-latest
53-
steps:
54-
- uses: actions/checkout@v4
55-
- uses: denoland/setup-deno@v1
56-
with:
57-
deno-version: ${{ env.DENO_VERSION }}
58-
- name: Test
59-
run: |
60-
deno bench
61-
timeout-minutes: 5
62-
6356
jsr-publish:
6457
runs-on: ubuntu-latest
6558
steps:

0 commit comments

Comments
 (0)