CI #3311
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
schedule: | |
- cron: '30 12 * * *' | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
node-version: [ 18, 20, 22, 23 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Dependencies | |
run: npm install --no-package-lock | |
- name: Run All Validations | |
run: npm run ci | |
run-tests-webworker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- run: npm install --no-package-lock | |
- run: npm run webworker-install | |
- run: npm run webworker | |
- run: npm run playwright-install-bare | |
- run: npm run playwright-test-docker | |
install-global: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Package markdownlint-cli2 | |
run: npm pack | |
- name: Install markdownlint-cli2 globally | |
run: sudo npm install --global --no-package-lock --production markdownlint-cli2-*.tgz | |
- name: Lint without formatters | |
run: markdownlint-cli2 CONTRIBUTING.md README.md | |
- name: Package formatter-default | |
run: cd formatter-default && npm pack | |
- name: Package formatter-codequality | |
run: cd formatter-codequality && npm pack | |
- name: Package formatter-json | |
run: cd formatter-json && npm pack | |
- name: Package formatter-junit | |
run: cd formatter-junit && npm pack | |
- name: Package formatter-pretty | |
run: cd formatter-pretty && npm pack | |
- name: Package formatter-sarif | |
run: cd formatter-sarif && npm pack | |
- name: Package formatter-summarize | |
run: cd formatter-summarize && npm pack | |
- name: Package formatter-template | |
run: cd formatter-template && npm pack | |
- name: Install formatters globally | |
run: sudo npm install --global --no-package-lock --production ./formatter-default/*.tgz ./formatter-codequality/*.tgz ./formatter-json/*.tgz ./formatter-junit/*.tgz ./formatter-pretty/*.tgz ./formatter-sarif/*.tgz ./formatter-summarize/*.tgz ./formatter-template/*.tgz | |
- name: Lint with formatters | |
run: cp test/outputFormatters-npm/.markdownlint-cli2.jsonc . && markdownlint-cli2 CONTRIBUTING.md README.md | |
- name: Uninstall markdownlint-cli2 globally | |
run: sudo npm uninstall --global --no-package-lock markdownlint-cli2 | |
- name: Install markdownlint-cli2 dependencies locally | |
run: sudo npm install --no-package-lock --production | |
- name: Lint with formatters | |
run: node ./markdownlint-cli2 CONTRIBUTING.md README.md | |
lint-dockerfile: | |
runs-on: ubuntu-latest | |
container: hadolint/hadolint:latest-alpine | |
steps: | |
- uses: actions/checkout@v4 | |
- run: hadolint docker/Dockerfile | |
- run: hadolint docker/Dockerfile-rules |