Skip to content

CI

CI #2699

Workflow file for this run

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 ]
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
- name: Install Dependencies for Web Worker
run: npm run webworker-install
- name: Run Webpack for Web Worker
run: npm run webworker
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: 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
- 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