Skip to content

Commit

Permalink
Only run bats diagnostics on failure (#24)
Browse files Browse the repository at this point in the history
* Only run bats diagnostics on failure

* Try a different failure syntax

* Third time lucky?

* Always run if we failed, even though the previous step failed

As per actions/runner#491

* Try and fix the logic again

* Simplify the testing

* Try a different way of checking for failure

* Try matching on any status, is matrix confusing things?

* Drop the matrix for now

* Fix the workflow syntax

* Different variable name

* Undo the hacking, matrix the bats tests

* Actually run bats if we need to

* Undo the deliberate test breakage
  • Loading branch information
peternewman authored Feb 2, 2021
1 parent 7cdfde6 commit 6de8633
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,22 @@ jobs:

diagnose_bats:
name: Diagnose bats
needs: test
if: always() && needs.test.result == 'failure'
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
codespell_pip_version: ['codespell']
include:
- codespell_pip_version: 'git+https://github.com/codespell-project/codespell.git'
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v2
- run: pip3 --quiet --quiet install git+https://github.com/codespell-project/codespell.git
- run: pip3 --quiet --quiet install ${{ matrix.codespell_pip_version }}
- run: |
# Skip the bats diagnostics
exit 0
# Simulate the Dockerfile COPY command
[ -d "${RUNNER_TEMP}/code/" ] || sudo mkdir -p ${RUNNER_TEMP}/code/
[ -f "${RUNNER_TEMP}/code/codespell-matcher.json" ] || sudo cp codespell-problem-matcher/codespell-matcher.json ${RUNNER_TEMP}/code/
Expand Down

0 comments on commit 6de8633

Please sign in to comment.