mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-21 06:53:17 +08:00
9425b8adc2
* upstream/develop: (81 commits) style(docs): fix prettier issues (extra newline) Corrected theme variables reference table layout Fix typos in README.md build: lint-staged docs in packages/mermaid/src/… chore(docs): run `pnpm run docs:build` build(docs): fix `pnpm run docs:{build,verify}` docs: replace `yarn` with `pnpm` in dev guide build: re-enable `prepare` script for husky setup build: update pre-commit rules to use `pnpm` Arrow tip aligned to edge of box updated pnpm-lock file ci(e2e): Skip pnpm cache if skipping cypress run ci(e2e): remove `headless` arg from cypress run build(dev): Fix dev server not showing mermaid.js Fixed sample test Adding example diagram as a template for a new diagram Removed test folder Returning the borders to the e2e tests Fix for tests Updated version ...
75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push: {}
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [16.x]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
with:
|
|
fetch-depth: 2
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
|
|
- uses: actions/checkout@v3
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
# uses version from "packageManager" field in package.json
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
cache: pnpm
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install Packages
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
env:
|
|
CYPRESS_CACHE_FOLDER: .cache/Cypress
|
|
|
|
- name: Run Linting
|
|
run: pnpm run lint
|
|
|
|
- name: Run changed-files using the fork point of a pull request
|
|
id: changed-files-fork-point
|
|
uses: tj-actions/changed-files@v29
|
|
with:
|
|
use_fork_point: 'true'
|
|
files: |
|
|
src/docs/*
|
|
|
|
- name: Run step if any file(s) in the docs folder change
|
|
if: steps.changed-files-fork-point.outputs.only_modified == 'true'
|
|
run: |
|
|
echo "Only files in the src/docs folder has changed."
|
|
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
|
yarn docs:build
|
|
|
|
- name: Commit changes
|
|
uses: EndBug/add-and-commit@v9
|
|
if: steps.changed-files-fork-point.outputs.only_modified == 'true'
|
|
with:
|
|
message: 'Update docs'
|
|
add: 'docs/*'
|
|
|
|
- name: Verify Docs
|
|
run: pnpm run docs:verify
|