mirror of
https://github.com/major/MySQLTuner-perl.git
synced 2024-09-21 07:47:08 +00:00
upd: reordering steps
This commit is contained in:
parent
8f1abe22b3
commit
0a80fc9d1b
30
.github/actions/install_db/actions.yml
vendored
Normal file
30
.github/actions/install_db/actions.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup MySQL Tuner repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up MySQL
|
||||
uses: mirromutth/mysql-action@v1.1
|
||||
with:
|
||||
mysql root password: "root"
|
||||
mysql version: "${{ inputs.MYSQL_VERSION }}"
|
||||
|
||||
- name: Injecting credentials
|
||||
run: |
|
||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
||||
|
||||
- name: Cloning test_db dataset
|
||||
run: |
|
||||
git clone https://github.com/datacharmer/test_db.git
|
||||
|
||||
- name: Injecting test_db dataset
|
||||
run: |
|
||||
sleep 5s
|
||||
cd test_db
|
||||
netstat -ltpn
|
||||
mysql -e 'select version();'
|
||||
mysql -e 'CREATE DATABASE data;'
|
||||
mysql data< ./employees.sql
|
||||
cd -
|
||||
rm -rf test_db
|
11
.github/actions/pull_and_mysql/actions.yml
vendored
Normal file
11
.github/actions/pull_and_mysql/actions.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup MySQL Tuner repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up MySQL
|
||||
uses: mirromutth/mysql-action@v1.1
|
||||
with:
|
||||
mysql root password: "root"
|
||||
mysql version: "${{ inputs.MYSQL_VERSION }}"
|
43
.github/workflows/generate_examples.yml
vendored
43
.github/workflows/generate_examples.yml
vendored
@ -16,33 +16,10 @@ jobs:
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Setup MySQL Tuner repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up MySQL
|
||||
uses: mirromutth/mysql-action@v1.1
|
||||
- uses: .github/actions/install_db
|
||||
with:
|
||||
mysql root password: "root"
|
||||
mysql version: "8.0"
|
||||
- name: Injecting credentials
|
||||
run: |
|
||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
||||
|
||||
- name: Cloning test_db dataset
|
||||
run: |
|
||||
git clone https://github.com/datacharmer/test_db.git
|
||||
MYSQL_VERSION: "8.0"
|
||||
|
||||
- name: Injecting test_db dataset
|
||||
run: |
|
||||
sleep 5s
|
||||
cd test_db
|
||||
netstat -ltpn
|
||||
mysql -e 'select version();'
|
||||
mysql -e 'CREATE DATABASE data;'
|
||||
mysql data< ./employees.sql
|
||||
cd -
|
||||
rm -rf test_db
|
||||
# Runs a single command using the runners shell
|
||||
- name: Run verbose mode with dumpdir result
|
||||
run: |
|
||||
@ -50,10 +27,12 @@ jobs:
|
||||
sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result --json | tee -a ./examples/github/result/result.json
|
||||
|
||||
# Runs a single command using the runners shell
|
||||
- name: Commit example result to repo
|
||||
run: |
|
||||
git config --global user.name "Jean-Marie Renouard"
|
||||
git config --global user.email "jmrenouard@gmail.com"
|
||||
git add .
|
||||
git commit -m "Commit example result for employees database for Actions"
|
||||
git push
|
||||
- name: Run the Action
|
||||
uses: devops-infra/action-commit-push@master
|
||||
with:
|
||||
github_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
add_timestamp: true
|
||||
commit_prefix: "[AUTO]"
|
||||
commit_message: "Updates result examples (via Actions)"
|
||||
force: false
|
||||
target_branch: update/version
|
9
.github/workflows/pull_request.yml
vendored
9
.github/workflows/pull_request.yml
vendored
@ -23,14 +23,9 @@ jobs:
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Setup MySQL Tuner repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up MySQL
|
||||
uses: mirromutth/mysql-action@v1.1
|
||||
- uses: .github/actions/pull_and_mysql
|
||||
with:
|
||||
mysql root password: "root"
|
||||
mysql version: "8.0"
|
||||
MYSQL_VERSION: "8.0"
|
||||
|
||||
- name: Run help mode
|
||||
run: |
|
||||
|
27
.github/workflows/run_mt_with_db.yml
vendored
27
.github/workflows/run_mt_with_db.yml
vendored
@ -16,33 +16,10 @@ jobs:
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Setup MySQL Tuner repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up MySQL
|
||||
uses: mirromutth/mysql-action@v1.1
|
||||
- uses: .github/actions/install_db
|
||||
with:
|
||||
mysql root password: "root"
|
||||
mysql version: "8.0"
|
||||
- name: Injecting credentials
|
||||
run: |
|
||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
||||
|
||||
- name: Cloning test_db dataset
|
||||
run: |
|
||||
git clone https://github.com/datacharmer/test_db.git
|
||||
MYSQL_VERSION: "8.0"
|
||||
|
||||
- name: Injecting test_db dataset
|
||||
run: |
|
||||
sleep 5s
|
||||
cd test_db
|
||||
netstat -ltpn
|
||||
mysql -e 'select version();'
|
||||
mysql -e 'CREATE DATABASE data;'
|
||||
mysql data< ./employees.sql
|
||||
cd -
|
||||
rm -rf test_db
|
||||
# Runs a single command using the runners shell
|
||||
- name: Run help mode
|
||||
run: perl ./mysqltuner.pl --help
|
||||
|
1
.github/workflows/update_cve_and_docs.yml
vendored
1
.github/workflows/update_cve_and_docs.yml
vendored
@ -20,7 +20,6 @@ jobs:
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Setup MySQL Tuner repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user