2021-01-14 00:08:22 +01:00
|
|
|
name: Test markdownlint-cli2-action
|
2021-01-13 07:19:56 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2021-01-16 05:44:36 +01:00
|
|
|
test-script:
|
|
|
|
name: Run test script
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-22 07:30:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
2021-01-16 05:44:36 +01:00
|
|
|
- run: npm install --no-package-lock
|
|
|
|
- run: npm run test
|
2021-01-14 00:08:22 +01:00
|
|
|
no-globs:
|
2022-07-23 08:16:36 +02:00
|
|
|
name: No globs (README.md, 0 errors)
|
2021-01-13 07:19:56 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-22 07:30:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-14 00:08:22 +01:00
|
|
|
- uses: ./
|
2022-07-23 22:28:59 +02:00
|
|
|
one-glob-file:
|
2022-07-23 08:16:36 +02:00
|
|
|
name: One glob (test/errors.md, 3 errors)
|
2021-01-14 00:08:22 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-22 07:30:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-14 00:08:22 +01:00
|
|
|
- uses: ./
|
2021-01-13 23:29:36 +01:00
|
|
|
with:
|
2021-01-13 23:50:05 +01:00
|
|
|
globs: test/errors.md
|
2022-07-23 22:28:59 +02:00
|
|
|
one-glob-pattern:
|
|
|
|
name: One glob (*.md, 3 errors)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: ./
|
|
|
|
with:
|
|
|
|
globs: '*.md'
|
2021-01-14 00:08:22 +01:00
|
|
|
two-globs:
|
2022-07-23 08:16:36 +02:00
|
|
|
name: Two globs (README.md and test/errors.md, 3 errors)
|
2021-01-14 00:08:22 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-22 07:30:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-14 00:08:22 +01:00
|
|
|
- uses: ./
|
2021-01-13 23:50:05 +01:00
|
|
|
with:
|
|
|
|
globs: |
|
|
|
|
*.md
|
2021-01-14 00:08:22 +01:00
|
|
|
test/*
|
2022-07-22 07:24:48 +02:00
|
|
|
command-config:
|
2022-07-23 08:16:36 +02:00
|
|
|
name: Command = config (test/errors.md, 2 errors)
|
2022-07-22 07:24:48 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-22 07:30:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-22 07:24:48 +02:00
|
|
|
- uses: ./
|
|
|
|
with:
|
|
|
|
command: config
|
|
|
|
globs: |
|
2022-07-23 08:18:19 +02:00
|
|
|
config/test.markdownlint.jsonc
|
2022-07-22 07:24:48 +02:00
|
|
|
test/*
|
2022-07-23 22:28:59 +02:00
|
|
|
command-config-invalid:
|
2022-07-23 22:36:46 +02:00
|
|
|
name: Command = config (invalid configuration file, fails)
|
2022-07-23 22:28:59 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: ./
|
|
|
|
with:
|
|
|
|
command: config
|
|
|
|
globs: |
|
|
|
|
invalid.markdownlint.jsonc
|
|
|
|
test/*
|
2022-07-22 07:24:48 +02:00
|
|
|
command-config-missing:
|
2022-07-23 08:16:36 +02:00
|
|
|
name: Command = config (missing configuration file, fails)
|
2022-07-22 07:24:48 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-22 07:30:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-22 07:24:48 +02:00
|
|
|
- uses: ./
|
|
|
|
with:
|
|
|
|
command: config
|
|
|
|
command-fix:
|
2022-07-23 08:16:36 +02:00
|
|
|
name: Command = fix (test/errors.md, 0 errors)
|
2022-07-22 07:24:48 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-22 07:30:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-22 07:24:48 +02:00
|
|
|
- uses: ./
|
|
|
|
with:
|
|
|
|
command: fix
|
|
|
|
command-unsupported:
|
|
|
|
name: Command = unsupported (fails)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-22 07:30:51 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-22 07:24:48 +02:00
|
|
|
- uses: ./
|
|
|
|
with:
|
|
|
|
command: unsupported
|