-
Notifications
You must be signed in to change notification settings - Fork 34
125 lines (111 loc) · 3.61 KB
/
Copy pathperf-local.yml
File metadata and controls
125 lines (111 loc) · 3.61 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Local Persistent Performance
on:
pull_request:
paths:
- 'pkg/api/v2/client_local.go'
- 'pkg/api/v2/client_local_embedded.go'
- 'pkg/api/v2/client_local_perf_test.go'
- 'pkg/api/v2/client_local_perf_helpers_test.go'
- 'pkg/api/v2/client_local_perf_helpers_context_test.go'
- 'pkg/api/v2/client_local_perf_helpers_unit_test.go'
- 'pkg/api/v2/client_local_library_download.go'
- 'pkg/api/v2/client_local_crosslang_integration_test.go'
- 'pkg/embeddings/default_ef/**'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- '.github/workflows/perf-local.yml'
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
mode:
description: 'Run mode'
required: true
default: 'smoke'
type: choice
options:
- smoke
- soak
- both
permissions:
contents: read
jobs:
smoke:
name: Local Perf Smoke
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && (inputs.mode == 'smoke' || inputs.mode == 'both'))
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Cache local runtime assets
uses: actions/cache@v4
with:
path: |
~/.cache/chroma
key: perf-local-smoke-${{ runner.os }}-${{ hashFiles('go.sum') }}
restore-keys: |
perf-local-smoke-${{ runner.os }}-
- name: Run smoke profile
run: make test-local-load-smoke
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload smoke artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: perf-local-smoke
path: artifacts/perf/smoke
- name: Publish smoke summary
if: always()
run: |
if [ -f artifacts/perf/smoke/perf-summary-smoke.md ]; then
cat artifacts/perf/smoke/perf-summary-smoke.md >> "$GITHUB_STEP_SUMMARY"
else
echo "No smoke markdown summary produced" >> "$GITHUB_STEP_SUMMARY"
fi
soak:
name: Local Perf Soak
runs-on: ubuntu-latest
timeout-minutes: 70
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && (inputs.mode == 'soak' || inputs.mode == 'both'))
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Cache local runtime assets
uses: actions/cache@v4
with:
path: |
~/.cache/chroma
key: perf-local-soak-${{ runner.os }}-${{ hashFiles('go.sum') }}
restore-keys: |
perf-local-soak-${{ runner.os }}-
- name: Run soak profile (report-only)
run: make test-local-soak-nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload soak artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: perf-local-soak
path: artifacts/perf/soak
- name: Publish soak summary
if: always()
run: |
if [ -f artifacts/perf/soak/perf-summary-soak.md ]; then
cat artifacts/perf/soak/perf-summary-soak.md >> "$GITHUB_STEP_SUMMARY"
else
echo "No soak markdown summary produced" >> "$GITHUB_STEP_SUMMARY"
fi