feat: adding matrix in all workflows

This commit is contained in:
Jean-Marie Renouard 2023-03-23 13:40:03 +00:00
parent 5fb453f821
commit 964b80943d
4 changed files with 14 additions and 9 deletions

View file

@ -9,8 +9,11 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
mysql_examples:
# This workflow contains a single job called "build"
strategy:
matrix:
MYSQL_VERSION: [5.7, 8.0]
# The type of runner that the job will run on
runs-on: ubuntu-latest
@ -23,7 +26,7 @@ jobs:
uses: mirromutth/mysql-action@v1.1
with:
mysql root password: "root"
mysql version: "8.0"
mysql version: "${{ matrix.MYSQL_VERSION }}"
- name: Injecting credentials
run: |
@ -47,7 +50,7 @@ jobs:
- name: Run verbose mode with dumpdir result
run: |
mkdir -p ./examples/github/result
sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result --json | tee -a ./examples/github/result/result.json
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
# Runs a single command using the runners shell
- name: Run the Action
@ -58,4 +61,4 @@ jobs:
commit_prefix: "[AUTO]"
commit_message: "Updates result examples (via Actions)"
force: false
target_branch: update/version
target_branch: master

View file

@ -10,7 +10,10 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
run_mt_with_db:
strategy:
matrix:
MYSQL_VERSION: [5.7, 8.0]
# The type of runner that the job will run on
runs-on: ubuntu-latest
@ -23,7 +26,7 @@ jobs:
uses: mirromutth/mysql-action@v1.1
with:
mysql root password: "root"
mysql version: "${{ inputs.MYSQL_VERSION }}"
mysql version: "${{ matrix.MYSQL_VERSION }}"
- name: Injecting credentials
run: |

View file

@ -45,4 +45,4 @@ jobs:
commit_prefix: "[AUTO]"
commit_message: "Updates CVE and docs (via Actions)"
force: false
target_branch: update/version
target_branch: master

@ -1 +0,0 @@
Subproject commit d01cb62fcfa4671773f167480df174d8ce4316c1