name: Test markdownlint-cli2-action on: pull_request: push: workflow_dispatch: jobs: test-script: name: Run test script runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - run: npm install --no-package-lock - run: npm run test no-globs: name: No globs (README.md, 0 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ one-glob-file: name: One glob (test/errors.md, 3 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ with: globs: test/errors.md one-glob-pattern: name: One glob (*.md, 3 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ with: globs: '*.md' two-globs: name: Two globs (README.md and test/errors.md, 3 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ with: globs: | *.md test/* command-config: name: Command = config (test/errors.md, 2 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ with: command: config globs: | config/test.markdownlint.jsonc test/* command-config-invalid: name: Command = config (invalid configuration file, fails) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ with: command: config globs: | invalid.markdownlint.jsonc test/* command-config-missing: name: Command = config (missing configuration file, fails) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ with: command: config command-fix: name: Command = fix (test/errors.md, 0 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ with: command: fix command-unsupported: name: Command = unsupported (fails) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ with: command: unsupported