From 912e90ade1973975c0b3bc9bb0c39bc5e2a38b0b Mon Sep 17 00:00:00 2001 From: fi-do <31111172+fi-do@users.noreply.github.com> Date: Sun, 30 Jan 2022 23:01:10 +0100 Subject: [PATCH] add multiple bash checks --- .github/workflows/build.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbd5085..761a2af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,16 +9,25 @@ on: branches: [ master ] jobs: - linux-test: - name: Linux Test + test: + name: ShellCheck runs-on: ubuntu-20.04 steps: - uses: actions/checkout@master - name: Run ShellCheck uses: ludeeus/action-shellcheck@0.5.0 - - name: Syntax Testing - # -n : ead commands but do not execute them. This may be used to check a shell script for syntax errors. This is ignored by interactive shells. - run : | - bash -n dotman.sh - sh -n tools/install.sh - + bash: + name: BashTesting + runs-on: ubuntu-20.04 + strategy: + matrix: + bash: ["3.0", "4.0", "5.0"] + cmd: ["bash -n dotman.sh", "sh -n tools/install.sh"] + steps: + - uses: actions/checkout@master + - name: "Test ${{ matrix.cmd }} with bash ${{ matrix.bash }}" + uses: addnab/docker-run-action@v3 + with: + image: bash:${{ matrix.bash }} + options: -v ${{ github.workspace }}:/test -w /test + run: ${{ matrix.cmd }}