-
Notifications
You must be signed in to change notification settings - Fork 211
59 lines (52 loc) · 1.76 KB
/
perf.yaml
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
name: Network Performance Measurement
on:
workflow_run:
workflows: [Build Images]
types:
- completed
schedule:
# It runs on 17th minute of every 12 hours
- cron: '17 */12 * * *'
workflow_dispatch:
inputs:
tag:
description: 'Image Tag to use for the performance test'
required: true
permissions:
contents: read
id-token: write
jobs:
perf_test:
if: ${{ github.event != 'workflow_run' || github.event_name == 'merge_group' }}
name: Retina Performance Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go version
- name: Az CLI login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION }}
- name: Run performance measurement for Retina
env:
AZURE_APP_INSIGHTS_KEY: ${{ secrets.AZURE_APP_INSIGHTS_KEY }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
shell: bash
run: |
set -euo pipefail
if [ "${{ github.event }}" == "workflow_dispatch" ]; then
TAG=${{ github.event.inputs.tag }}
elif [ "${{ github.event_name }}" == "merge_group" ]; then
TAG=$(make version)
else
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
fi
go test -v ./test/e2e/. -timeout 2h -tags=perf -count=1 -args -image-tag=$TAG -image-registry=${{ vars.ACR_NAME }} -image-namespace=${{ github.repository }}