-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (51 loc) · 1.86 KB
/
database-stats.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
---
name: Get database stats
on:
workflow_dispatch:
inputs:
jobs:
get-database-stats:
runs-on: self-hosted
steps:
- name: Download and install MySql APT repository
run: |
wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb;
sudo dpkg -i mysql-apt-config_0.8.22-1_all.deb;
sudo apt-get update
- name: Install mysql cli and msql-shell
run: sudo apt-get install mysql-apt-config && sudo apt-get install -y mysql-shell mysql-client
- name: Checkout xdbtime repo
uses: actions/checkout@v4
with:
repository: 'xdbtime/xdbtime'
- name: Prepare database scripts
run: |
mkdir -p ~/.mysqlsh/init.d;
pwd;
ls -all;
cd /runner/_work/afterburner/afterburner/mysql/init.d;
cp xdbperformance-status.py ~/.mysqlsh/init.d;
- name: Create perfomance report
run: |
cd /runner/_work/afterburner/afterburner/mysql
echo "report = shell.reports.performance(shell.getSession())" | mysqlsh root:${{ secrets.AFTERBURNER_DB_PASSWORD }}@afterburner-db-mysql-headless.acme.svc.cluster.local:3306 --js
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.system-under-test }}-${{ github.job }}-${{ github.run_number }}.html
path: /runner/_work/afterburner/afterburner/mysql/reports/*.html
publish:
needs: get-database-stats
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: pages
- name: Download report
uses: actions/download-artifact@v3
with:
path: ${{ inputs.system-under-test || 'test-sut' }}-${{ github.job }}-${{ github.run_number }}.html
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4