generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (41 loc) · 1.29 KB
/
benchmark.yml
File metadata and controls
51 lines (41 loc) · 1.29 KB
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
name: Performance Benchmark
on:
schedule:
# Run every Monday at 9:00 AM UTC
- cron: '0 9 * * 1'
# Run every Wednesday at 9:00 AM UTC
- cron: '0 9 * * 3'
workflow_dispatch:
jobs:
get-configs:
uses: ./.github/workflows/configs.yml
benchmark:
needs: [get-configs]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Node.js ${{ needs.get-configs.outputs.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ needs.get-configs.outputs.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Run Benchmark
run: |
npm run benchmark -- \
--templates tst/resources/templates/*.json tst/resources/templates/*.yaml \
--output benchmark-results.md \
--iterations 5000
- name: Generate timestamp
id: timestamp
run: echo "date=$(date +'%Y-%m-%d-%H%M%S')" >> $GITHUB_OUTPUT
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{ steps.timestamp.outputs.date }}
path: benchmark-results.md
retention-days: 90