diff --git a/.github/workflows/pmem_ras.yml b/.github/workflows/pmem_ras.yml index 9a041e24a54..6ae2d02094a 100644 --- a/.github/workflows/pmem_ras.yml +++ b/.github/workflows/pmem_ras.yml @@ -34,11 +34,7 @@ jobs: linux: name: PMEM_RAS if: github.repository == 'pmem/pmdk' - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [[self-hosted, ras_controller]] + runs-on: [self-hosted, ras_controller] env: WORKDIR: utils/gha-runners @@ -50,16 +46,15 @@ jobs: # 'sed' command is used to filter out IP addresses from the ansible output, it will show up as the 'ras_runner' instead. # 'tee' command is used to save the overall output to the file. This file is needed for the next step. - name: Prepare and run RAS Linux tests via ansible-playbook - run: | - cd $WORKDIR - ansible-playbook -i $ras_runner, run-ras-linux.yml -e "host=all ansible_user=$ras_user" | sed 's/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/ras_runner/' | tee playbook_output.txt + working-directory: ${{ env.WORKDIR }} + run: ansible-playbook -i $ras_runner, run-ras-linux.yml -e "host=all ansible_user=$ras_user" | sed 's/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/ras_runner/' | tee playbook_output.txt # This simple step will look through the output in search of specific fail strings. - # If any phrase is found in the file, the workflow will fail. + # The workflow will fail if any of the expected phrases are found in the file. - name: Fail the workflow if the playbook finished with a failure + working-directory: ${{ env.WORKDIR }} run: | - cd $WORKDIR - if grep -E 'fatal: \[ras_runner\]: FAILED!|failed: \[ras_runner\]' "playbook_output.txt"; then + if grep -E '(fatal|failed): \[ras_runner\]' playbook_output.txt; then exit 1 else exit 0