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