-
Notifications
You must be signed in to change notification settings - Fork 579
65 lines (59 loc) · 1.87 KB
/
benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Midway memory leak check
on:
push:
branches: [main]
paths-ignore:
- 'site/**'
- '*.md'
pull_request:
branches: [main]
paths-ignore:
- 'site/**'
- '*.md'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['lts/*']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache
uses: actions/cache@v3
id: cache-lerna
env:
cache-name: cache-lerna
with:
path: |
node_modules
package-lock.json
packages/*/.eslintcache
packages/*/dist
packages/*/tsconfig.tsbuildinfo
packages/*/node_modules
packages/*/package-lock.json
key: ${{ runner.OS }}-build-${{ env.cache-name }}-${{ github.ref }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-${{ github.ref }}-
- name: Install Dependencies
run: |
npm i --no-audit -g autocannon zx
# npm run purge # if you want to clean up the cache
npm i --no-audit
- name: Build
run: |
sed -i 's/\(moduleResolution.\+,\)/\1 "incremental": true,/' tsconfig.json
lerna run build --concurrency=2
- run: npm run link
- name: Benchmark application-koa-v3
timeout-minutes: 10
run: |
./scripts/benchmark/start-benchmark.mjs --p=midway_benchmark_app --repo=@midwayjs-examples/application-koa-v3
# - name: Benchmark application-web-v3
# timeout-minutes: 10
# run: |
# ./scripts/benchmark/start-benchmark.mjs --p=midway_benchmark_app --repo=@midwayjs-examples/application-web-v3