From 8b302e81873a9db0b4f5716d5b456931731d974a Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Thu, 23 Mar 2023 13:54:31 +0000 Subject: [PATCH] fix: fixing examples generation --- .github/workflows/generate_examples.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_examples.yml b/.github/workflows/generate_examples.yml index b3e1d67..2aaed39 100644 --- a/.github/workflows/generate_examples.yml +++ b/.github/workflows/generate_examples.yml @@ -36,12 +36,15 @@ jobs: run: | git clone https://github.com/datacharmer/test_db.git - - name: Injecting test_db dataset + - name: Test database is Up and Running run: | sleep 5s cd test_db netstat -ltpn mysql -e 'select version();' + + - name: Injecting test_db dataset + run: | mysql -e 'CREATE DATABASE data;' mysql data< ./employees.sql cd - @@ -49,9 +52,13 @@ jobs: # Runs a single command using the runners shell - name: Run verbose mode with dumpdir result run: | - mkdir -p ./examples/github/result + mkdir -p ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }} sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }} --json | tee -a ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}/result.json + - name: Adding examples to Git + run: | + git add ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}/* + # Runs a single command using the runners shell - name: Run the Action uses: devops-infra/action-commit-push@master