Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: lint markdown files #1147

Merged
merged 4 commits into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 43 additions & 28 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,46 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: restore lerna
uses: actions/cache@master # must use unreleased master to cache multiple paths
id: cache
with:
path: |
node_modules
packages/*/node_modules
metapackages/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Bootstrap
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --only=dev --ignore-scripts
npx lerna bootstrap --no-ci --ignore-scripts -- --only=dev

- name: Lint
run: |
npm run lint
npm run lint:examples

- name: Install and Build API Dependencies
run: npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-filtered-dependencies

- name: Test Docs
run: npm run docs-test
- uses: actions/checkout@v2

- name: Lint changelog file
uses: avto-dev/markdown-lint@v1
with:
# Commenting due to
# https://github.com/avto-dev/markdown-lint/blob/aab9be9823fcd706f6da3e6ad6c64874c23fbd4c/lint/rules/changelog.js#L51-L71
# TODO: adhere to, or overwrite above rule and uncomment rules
# rules: "/lint/rules/changelog.js"
config: "/lint/config/changelog.yml"
args: "./CHANGELOG.md"

- name: Lint markdown files
uses: avto-dev/markdown-lint@v1
with:
args: "./**/*.md -i ./CHANGELOG.md"

- name: restore lerna
uses: actions/cache@master # must use unreleased master to cache multiple paths
id: cache
with:
path: |
node_modules
packages/*/node_modules
metapackages/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Bootstrap
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --only=dev --ignore-scripts
npx lerna bootstrap --no-ci --ignore-scripts -- --only=dev

- name: Lint
run: |
npm run lint
npm run lint:examples

- name: Install and Build API Dependencies
run: npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-filtered-dependencies

- name: Test Docs
run: npm run docs-test
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"MD013": false,
"MD024": false,
"MD033": false,
"MD041": false
}
Loading