-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 1.9 KB
/
testing-cache-hit-ratio.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
name: Pantheon Cache Hit Ratio
on:
push:
workflow_dispatch:
inputs:
panth-site:
description: Pantheon Site
required: true
type: string
default: "amon-carter-web"
panth-env:
description: Pantheon Environment
required: true
type: string
default: "live"
callback:
description: Callback url for reporting results.
required: false
type: string
env:
DEFAULT_URLS: "amon-carter-web"
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PANTHEON_SSH_KEY }}
config: ${{ secrets.SSH_CONFIG }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
# Debugger
# - uses: hmarr/debug-action@v2
- name: Inputs
run: |
echo ${{ inputs.urls }}
# Install Terminus.
- name: Install Terminus
uses: pantheon-systems/terminus-github-actions@main
with:
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }}
# Debugger
- uses: hmarr/debug-action@v2
- name: Call terminus to get cache hit ratio
timeout-minutes: 15
env:
PANTEHON_SITE: "${{ inputs.panth-site }}"
PANTHEON_ENV: "${{ inputs.panth-env }}"
CONNECT_BC_API: "${{ secrets.CONNECT_BC_KEY }}"
CALLBACK: "${{ inputs.callback }}"
run: |
terminus env:metrics ${PANTEHON_SITE}.${PANTHEON_ENV} --format=json > cache_hit_ratio.json
curl -X POST -H "api-key: $CONNECT_BC_API" -H 'Content-Type: application/json' -d @"cache_hit_ratio.json" $CALLBACK
# - name: Post Artifacts
# timeout-minutes: 15
# env:
# CONNECT_BC_API: "${{ secrets.CONNECT_BC_KEY }}"
# CALLBACK: "${{ inputs.callback }}"
# run: ./.github/scripts/chr-push-to-connect.sh