0
0
Fork 0
mirror of https://github.com/DavidAnson/markdownlint-cli2-action.git synced 2024-11-21 22:01:30 +01:00

Update GitHub Actions test workflow to pass when failing tests fail (but not when they

succeed).
This commit is contained in:
David Anson 2022-09-13 21:07:05 -07:00
parent 5d99076e99
commit 05972bf2b0

View file

@ -28,6 +28,10 @@ jobs:
- uses: ./ - uses: ./
with: with:
globs: test/errors.md globs: test/errors.md
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
one-glob-pattern: one-glob-pattern:
name: One glob (*.md, 0 errors) name: One glob (*.md, 0 errors)
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -46,6 +50,10 @@ jobs:
globs: | globs: |
*.md *.md
test/* test/*
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
command-config: command-config:
name: Command = config (test/errors.md, 2 errors) name: Command = config (test/errors.md, 2 errors)
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -57,6 +65,10 @@ jobs:
globs: | globs: |
config/test.markdownlint.jsonc config/test.markdownlint.jsonc
test/* test/*
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
command-config-invalid: command-config-invalid:
name: Command = config (invalid configuration file, fails) name: Command = config (invalid configuration file, fails)
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -68,6 +80,10 @@ jobs:
globs: | globs: |
invalid.markdownlint.jsonc invalid.markdownlint.jsonc
test/* test/*
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
command-config-missing: command-config-missing:
name: Command = config (missing configuration file, fails) name: Command = config (missing configuration file, fails)
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -76,6 +92,10 @@ jobs:
- uses: ./ - uses: ./
with: with:
command: config command: config
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
command-fix: command-fix:
name: Command = fix (test/errors.md, 0 errors) name: Command = fix (test/errors.md, 0 errors)
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -92,3 +112,7 @@ jobs:
- uses: ./ - uses: ./
with: with:
command: unsupported command: unsupported
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'