-
Notifications
You must be signed in to change notification settings - Fork 7.4k
56 lines (46 loc) · 1.25 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
name: Benchmark
on:
pull_request:
paths:
- 'packages/cli/**'
- 'packages/core/**'
- 'packages/workflow/**'
workflow_dispatch:
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
timeout-minutes: 20
env:
DB_POSTGRESDB_PASSWORD: password
steps:
- uses: actions/[email protected]
- name: Start Postgres
uses: isbang/[email protected]
with:
compose-file: ./.github/docker-compose.yml
services: postgres
- run: corepack enable
- uses: actions/[email protected]
with:
node-version: 18.x
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build
if: ${{ inputs.cacheKey == '' }}
run: pnpm build:backend
- name: Restore cached build artifacts
if: ${{ inputs.cacheKey != '' }}
uses: actions/cache/[email protected]
with:
path: ./packages/**/dist
key: ${{ inputs.cacheKey }}
- run: pnpm build:benchmark
working-directory: packages/cli
- name: Benchmark
uses: CodSpeedHQ/action@v2
with:
working-directory: packages/cli
run: |
pnpm benchmark:sqlite
pnpm benchmark:postgres