2022-05-10 17:26:08 -07:00
|
|
|
name: Lint
|
|
|
|
|
2022-05-10 17:29:50 -07:00
|
|
|
on:
|
|
|
|
push: {}
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
- ready_for_review
|
2022-05-10 17:26:08 -07:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-10-10 20:13:50 +08:00
|
|
|
node-version: [18.x]
|
2022-05-10 17:26:08 -07:00
|
|
|
steps:
|
2022-09-03 13:41:25 +05:30
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2022-09-25 19:36:39 +01:00
|
|
|
- uses: pnpm/action-setup@v2
|
|
|
|
# uses version from "packageManager" field in package.json
|
|
|
|
|
2022-09-03 13:41:25 +05:30
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2022-09-25 19:36:39 +01:00
|
|
|
cache: pnpm
|
2022-09-03 13:41:25 +05:30
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- name: Install Packages
|
|
|
|
run: |
|
2022-09-25 19:36:39 +01:00
|
|
|
pnpm install --frozen-lockfile
|
2022-09-03 13:41:25 +05:30
|
|
|
env:
|
|
|
|
CYPRESS_CACHE_FOLDER: .cache/Cypress
|
|
|
|
|
|
|
|
- name: Run Linting
|
2022-09-25 19:36:39 +01:00
|
|
|
run: pnpm run lint
|
2022-09-03 13:41:25 +05:30
|
|
|
|
|
|
|
- name: Verify Docs
|
2022-10-15 00:50:57 -03:00
|
|
|
run: cd .\packages\mermaid\ && pnpm run docs:verify
|