-
-
Notifications
You must be signed in to change notification settings - Fork 48
79 lines (72 loc) · 2.68 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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