From b33c70338cba296a7a3ad97b6ba30f5b2d5415b2 Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Thu, 23 Mar 2023 10:48:23 +0000 Subject: [PATCH] fix: revert changes --- .github/actions/install_db/actions.yml | 30 ---------------------- .github/actions/pull_and_mysql/actions.yml | 11 -------- .github/workflows/generate_examples.yml | 29 ++++++++++++++++++--- .github/workflows/pull_request.yml | 14 +++++++--- .github/workflows/run_mt_with_db.yml | 28 ++++++++++++++++++-- 5 files changed, 63 insertions(+), 49 deletions(-) delete mode 100644 .github/actions/install_db/actions.yml delete mode 100644 .github/actions/pull_and_mysql/actions.yml diff --git a/.github/actions/install_db/actions.yml b/.github/actions/install_db/actions.yml deleted file mode 100644 index a3fdb7e..0000000 --- a/.github/actions/install_db/actions.yml +++ /dev/null @@ -1,30 +0,0 @@ -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 \ No newline at end of file diff --git a/.github/actions/pull_and_mysql/actions.yml b/.github/actions/pull_and_mysql/actions.yml deleted file mode 100644 index a3171ea..0000000 --- a/.github/actions/pull_and_mysql/actions.yml +++ /dev/null @@ -1,11 +0,0 @@ -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 }}" \ No newline at end of file diff --git a/.github/workflows/generate_examples.yml b/.github/workflows/generate_examples.yml index 68901d3..e13d054 100644 --- a/.github/workflows/generate_examples.yml +++ b/.github/workflows/generate_examples.yml @@ -16,10 +16,33 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: .github/actions/install_db - with: - MYSQL_VERSION: "8.0" + - 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: "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 + + - 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: | diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index cd0759c..64d1f61 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -22,10 +22,18 @@ 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 - - uses: .github/actions/pull_and_mysql + - name: Setup MySQL Tuner repository + uses: actions/checkout@v3 + + - name: Set up MySQL + uses: mirromutth/mysql-action@v1.1 with: - MYSQL_VERSION: "8.0" + 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: Run help mode run: | diff --git a/.github/workflows/run_mt_with_db.yml b/.github/workflows/run_mt_with_db.yml index 4ba87cd..9d73b82 100644 --- a/.github/workflows/run_mt_with_db.yml +++ b/.github/workflows/run_mt_with_db.yml @@ -16,9 +16,33 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: .github/actions/install_db + - name: Setup MySQL Tuner repository + uses: actions/checkout@v3 + + - name: Set up MySQL + uses: mirromutth/mysql-action@v1.1 with: - MYSQL_VERSION: "8.0" + 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 # Runs a single command using the runners shell - name: Run help mode