forked from GoogleCloudPlatform/DataflowTemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (112 loc) · 4.38 KB
/
spanner-load-tests.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
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
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Checks that are intended to run on PRs containing Java code.
name: Spanner Load Tests
on:
schedule:
# at 02:00 weekly on every Monday.
- cron: '0 2 * * 1'
workflow_dispatch:
permissions: write-all
jobs:
load_tests:
name: Spanner Dataflow Templates Load tests
timeout-minutes: 1440 # 1 day
# Run on any runner that matches all the specified runs-on values.
runs-on: [ self-hosted, perf ]
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
fetch-depth: 0
- name: Setup Environment
id: setup-env
uses: ./.github/actions/setup-env
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Run Load Tests
run: |
./cicd/run-load-tests \
--modules-to-build="SPANNER" \
--it-region="us-central1" \
--it-project="cloud-teleport-testing" \
--it-artifact-bucket="cloud-teleport-testing-it-gitactions" \
--it-private-connectivity="datastream-private-connect-us-central1" \
--lt-export-project="cloud-teleport-testing" \
--lt-export-dataset="performance_tests" \
--lt-export-table="template_performance_metrics" \
- name: Create Github issue on failure
if: failure()
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
DATE: ${{ steps.date.outputs.date }}
with:
filename: .github/ISSUE_TEMPLATE/spanner-load-test-failure-issue-template.md
- name: Upload Load Tests Report
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: always() # always run even if the previous step fails
with:
name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml'
retention-days: 1
- name: Cleanup Java Environment
uses: ./.github/actions/cleanup-java-env
observe_load_tests:
name: Observe Spanner Dataflow Templates Load tests
needs: [load_tests]
timeout-minutes: 60
# Run on any runner that matches all the specified runs-on values.
runs-on: [ self-hosted, perf ]
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
fetch-depth: 0
- name: Setup Environment
id: setup-env
uses: ./.github/actions/setup-env
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Run Load Test Observers
run: |
./cicd/run-load-test-observer \
--modules-to-build="lt/observability" \
--it-region="us-central1" \
--it-project="cloud-teleport-testing" \
--it-artifact-bucket="cloud-teleport-testing-it-gitactions" \
--lt-export-project="cloud-teleport-testing" \
--lt-export-dataset="performance_tests" \
--lt-export-table="template_performance_metrics"
- name: Create Github issue on failure
if: failure()
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
DATE: ${{ steps.date.outputs.date }}
with:
filename: .github/ISSUE_TEMPLATE/spanner-load-test-failure-issue-template.md
- name: Upload Load Test Observer Report
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: always() # always run even if the previous step fails
with:
name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml'
retention-days: 1
- name: Cleanup Java Environment
uses: ./.github/actions/cleanup-java-env