-
Notifications
You must be signed in to change notification settings - Fork 879
115 lines (115 loc) · 4.33 KB
/
performance_metrics_cron.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
name: Run Performance Metrics Cron Job
on:
workflow_dispatch: {}
schedule:
- cron: 0 */6 * * *
env:
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_ENVIRONMENT: public
ARM_LOCATION: westus
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
AWS_ACCESS_KEY_ID: ' ${{ secrets.AWS_ACCESS_KEY_ID }}'
AWS_REGION: us-west-2
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
GOOGLE_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
GOOGLE_PROJECT: ${{ secrets.GCP_PROJECT_ID }}
GOOGLE_REGION: us-central1
GOOGLE_ZONE: us-central1-a
PACKET_AUTH_TOKEN: ${{ secrets.PACKET_AUTH_TOKEN }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_API: https://api.pulumi-staging.io
PULUMI_ENABLE_RESOURCE_REFERENCES: "1"
PULUMI_TEST_OWNER: moolumi
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
performance_metrics_cron:
name: performance_metrics_cron
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
go-version: ${{matrix.go-version}}
- name: Install DotNet ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{matrix.dotnet-version}}
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{matrix.node-version}}
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{matrix.python-version}}
- name: Install Python Deps
run: |-
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ env.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-duration-seconds: 7200
role-session-name: examples@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- uses: actions/checkout@v2
- name: Install Latest Stable Pulumi CLI
uses: pulumi/setup-pulumi@v2
- run: echo "Currently Pulumi $(pulumi version) is installed"
- name: Install Testing Dependencies
run: make ensure
- name: Install gotestfmt
uses: jaxxstorm/action-install-gh-release@v1.7.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo: gotesttools/gotestfmt
tag: v2.3.2
cache: enable
- name: Create a Folder for Collecting Traces
run: |-
mkdir "$PWD/traces"
- name: Add Test Trace Details
run: |
echo "PULUMI_VERSION=$(pulumi version)" >> $GITHUB_ENV
echo "PULUMI_TRACING_TAG_PULUMI_VERSION=$(pulumi version)" >> $GITHUB_ENV
echo "PULUMI_TRACING_DIR=$PWD/traces" >> $GITHUB_ENV
- name: Run Performance Matrix
# Even if some Go tests fail, others may have succeded and
# produced perf data; continue to try to upload it.
continue-on-error: true
shell: bash
run: |
set -euo pipefail
cd misc/test && go test . --timeout 4h -count=1 -json -short -parallel 40 --tags=Performance 2>&1 | tee /tmp/gotest.log | gotestfmt
- name: Upload traces GHA artifact
uses: actions/upload-artifact@v3
with:
name: traces
path: traces
retention-days: 14
- name: Upload Traces to s3://cli-performance-metrics
run: |-
F="$PWD/traces/metrics.parquet.snappy"
RAND=$(python -c 'import uuid; print(uuid.uuid4())')
aws s3 cp "$F" "s3://cli-performance-metrics/cli_performance_metrics/date_partition/date=$(date -u +'%Y-%m-%d')/cli_performance_metrics_$RAND.parquet.snappy"
strategy:
fail-fast: false
matrix:
dotnet-version:
- 6.0.114
go-version:
- 1.19.x
node-version:
- 16.x
platform:
- ubuntu-latest
python-version:
- "3.9"