You've already forked library-registry
mirror of
https://github.com/arduino/library-registry.git
synced 2025-07-29 14:01:15 +03:00
Simplify documentation and configuration file CI system
Now that the parser tool is moved out of the repository, it makes less sense to use the taskfile-based approach for the CI infrastructure. In order to make the repository more contributor-friendly, the documentation and configuration checking system is now confined to the .github subfolder.
This commit is contained in:
5
.github/.markdown-link-check.json
vendored
Normal file
5
.github/.markdown-link-check.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"retryOn429": true,
|
||||
"retryCount": 3,
|
||||
"aliveStatusCodes": [200, 206]
|
||||
}
|
61
.github/.markdownlint.yml
vendored
Normal file
61
.github/.markdownlint.yml
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
# See: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
|
||||
# The code style defined in this file is the official standardized style to be used in all Arduino projects and should
|
||||
# not be modified.
|
||||
# Note: Rules disabled solely because they are redundant to Prettier are marked with a "Prettier" comment.
|
||||
|
||||
default: false
|
||||
MD001: false
|
||||
MD002: false
|
||||
MD003: false # Prettier
|
||||
MD004: false # Prettier
|
||||
MD005: false # Prettier
|
||||
MD006: false # Prettier
|
||||
MD007: false # Prettier
|
||||
MD008: false # Prettier
|
||||
MD009:
|
||||
br_spaces: 0
|
||||
strict: true
|
||||
list_item_empty_lines: false # Prettier
|
||||
MD010: false # Prettier
|
||||
MD011: true
|
||||
MD012: false # Prettier
|
||||
MD013: false
|
||||
MD014: false
|
||||
MD018: true
|
||||
MD019: false # Prettier
|
||||
MD020: true
|
||||
MD021: false # Prettier
|
||||
MD022: false # Prettier
|
||||
MD023: false # Prettier
|
||||
MD024: false
|
||||
MD025:
|
||||
level: 1
|
||||
front_matter_title: '^\s*"?title"?\s*[:=]'
|
||||
MD026: false
|
||||
MD027: false # Prettier
|
||||
MD028: false
|
||||
MD029:
|
||||
style: one
|
||||
MD030:
|
||||
ul_single: 1
|
||||
ol_single: 1
|
||||
ul_multi: 1
|
||||
ol_multi: 1
|
||||
MD031: false # Prettier
|
||||
MD032: false # Prettier
|
||||
MD033: false
|
||||
MD034: false
|
||||
MD035: false # Prettier
|
||||
MD036: false
|
||||
MD037: true
|
||||
MD038: true
|
||||
MD039: true
|
||||
MD040: false
|
||||
MD041: false
|
||||
MD042: true
|
||||
MD043: false
|
||||
MD044: false
|
||||
MD045: true
|
||||
MD046:
|
||||
style: fenced
|
||||
MD047: false # Prettier
|
38
.github/workflows/check-config.yml
vendored
38
.github/workflows/check-config.yml
vendored
@ -1,38 +0,0 @@
|
||||
name: Check configuration files
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/check-config.yml"
|
||||
- "Taskfile.yml"
|
||||
- "**.yml"
|
||||
- "**.yaml"
|
||||
- "**.json"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-config.yml"
|
||||
- "Taskfile.yml"
|
||||
- "**.yml"
|
||||
- "**.yaml"
|
||||
- "**.json"
|
||||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
|
||||
workflow_dispatch:
|
||||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout local repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Taskfile
|
||||
uses: arduino/actions/setup-taskfile@master
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: 3.x
|
||||
|
||||
- name: Check formatting
|
||||
run: task config:check-formatting
|
37
.github/workflows/check-docs.yml
vendored
37
.github/workflows/check-docs.yml
vendored
@ -1,37 +0,0 @@
|
||||
name: Check documentation files
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/check-docs.yml"
|
||||
- "Taskfile.yml"
|
||||
- "**.md"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-docs.yml"
|
||||
- "Taskfile.yml"
|
||||
- "**.md"
|
||||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
|
||||
workflow_dispatch:
|
||||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout local repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Taskfile
|
||||
uses: arduino/actions/setup-taskfile@master
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: 3.x
|
||||
|
||||
- name: Check links
|
||||
run: task docs:check-links
|
||||
|
||||
- name: Check formatting
|
||||
run: task docs:check-formatting
|
67
.github/workflows/check-markdown.yml
vendored
Normal file
67
.github/workflows/check-markdown.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
name: Check Markdown
|
||||
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/check-markdown.yml"
|
||||
- ".github/.markdown-link-check.json"
|
||||
- "**/.markdownlint*"
|
||||
- "**.md"
|
||||
- "**.mdx"
|
||||
- "**.mkdn"
|
||||
- "**.mdown"
|
||||
- "**.markdown"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-markdown.yml"
|
||||
- ".github/.markdown-link-check.json"
|
||||
- "**/.markdownlint*"
|
||||
- "**.md"
|
||||
- "**.mdx"
|
||||
- "**.mkdn"
|
||||
- "**.mdown"
|
||||
- "**.markdown"
|
||||
schedule:
|
||||
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to markdownlint.
|
||||
- cron: "0 8 * * TUE"
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Initialize markdownlint-cli problem matcher
|
||||
uses: xt0rted/markdownlint-problem-matcher@v1
|
||||
|
||||
- name: Install markdownlint-cli
|
||||
run: sudo npm install --global markdownlint-cli
|
||||
|
||||
- name: Run markdownlint
|
||||
run: markdownlint --config "${{ github.workspace }}/.github/.markdownlint.yml" "**/*.md"
|
||||
|
||||
links:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Determine whether only modified files should be checked
|
||||
id: check-modified
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "::set-output name=value::yes"
|
||||
|
||||
- name: Check links
|
||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
with:
|
||||
config-file: .github/.markdown-link-check.json
|
||||
use-quiet-mode: "yes"
|
||||
check-modified-files-only: ${{ steps.check-modified.outputs.value }}
|
||||
base-branch: ${{ github.base_ref }}
|
224
.github/workflows/check-prettier-formatting.yml
vendored
Normal file
224
.github/workflows/check-prettier-formatting.yml
vendored
Normal file
@ -0,0 +1,224 @@
|
||||
name: Check Prettier Formatting
|
||||
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/check-prettier-formatting.yml"
|
||||
- "**/.prettierignore"
|
||||
- "**/.prettierrc*"
|
||||
# CSS
|
||||
- "**.css"
|
||||
- "**.wxss"
|
||||
# PostCSS
|
||||
- "**.pcss"
|
||||
- "**.postcss"
|
||||
# Less
|
||||
- "**.less"
|
||||
# SCSS
|
||||
- "**.scss"
|
||||
# GraphQL
|
||||
- "**.graphqls?"
|
||||
- "**.gql"
|
||||
# handlebars
|
||||
- "**.handlebars"
|
||||
- "**.hbs"
|
||||
# HTML
|
||||
- "**.mjml"
|
||||
- "**.html?"
|
||||
- "**.html.hl"
|
||||
- "**.st"
|
||||
- "**.xht"
|
||||
- "**.xhtml"
|
||||
# Vue
|
||||
- "**.vue"
|
||||
# JavaScript
|
||||
- "**.flow"
|
||||
- "**._?jsb?"
|
||||
- "**.bones"
|
||||
- "**.cjs"
|
||||
- "**.es6?"
|
||||
- "**.frag"
|
||||
- "**.gs"
|
||||
- "**.jake"
|
||||
- "**.jscad"
|
||||
- "**.jsfl"
|
||||
- "**.js[ms]"
|
||||
- "**.[mn]js"
|
||||
- "**.pac"
|
||||
- "**.wxs"
|
||||
- "**.[xs]s?js"
|
||||
- "**.xsjslib"
|
||||
# JSX
|
||||
- "**.jsx"
|
||||
# TypeScript
|
||||
- "**.ts"
|
||||
# TSX
|
||||
- "**.tsx"
|
||||
# JSON
|
||||
- "**/.eslintrc"
|
||||
- "**.json"
|
||||
- "**.avsc"
|
||||
- "**.geojson"
|
||||
- "**.gltf"
|
||||
- "**.har"
|
||||
- "**.ice"
|
||||
- "**.JSON-tmLanguage"
|
||||
- "**.mcmeta"
|
||||
- "**.tfstate"
|
||||
- "**.topojson"
|
||||
- "**.webapp"
|
||||
- "**.webmanifest"
|
||||
- "**.yyp?"
|
||||
# JSONC
|
||||
- "**/.babelrc"
|
||||
- "**/.jscsrc"
|
||||
- "**/.js[hl]intrc"
|
||||
- "**.jsonc"
|
||||
- "**.sublime-*"
|
||||
# JSON5
|
||||
- "**.json5"
|
||||
# Markdown
|
||||
- "**.mdx?"
|
||||
- "**.markdown"
|
||||
- "**.mk?down"
|
||||
- "**.mdwn"
|
||||
- "**.mkdn?"
|
||||
- "**.ronn"
|
||||
- "**.workbook"
|
||||
# YAML
|
||||
- "**/.clang-format"
|
||||
- "**/.clang-tidy"
|
||||
- "**/.gemrc"
|
||||
- "**/glide.lock"
|
||||
- "**.yml"
|
||||
- "**.mir"
|
||||
- "**.reek"
|
||||
- "**.rviz"
|
||||
- "**.sublime-syntax"
|
||||
- "**.syntax"
|
||||
- "**.yaml"
|
||||
- "**.yaml-tmlanguage"
|
||||
- "**.yaml.sed"
|
||||
- "**.yml.mysql"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-prettier-formatting.yml"
|
||||
- "**/.prettierignore"
|
||||
- "**/.prettierrc*"
|
||||
# CSS
|
||||
- "**.css"
|
||||
- "**.wxss"
|
||||
# PostCSS
|
||||
- "**.pcss"
|
||||
- "**.postcss"
|
||||
# Less
|
||||
- "**.less"
|
||||
# SCSS
|
||||
- "**.scss"
|
||||
# GraphQL
|
||||
- "**.graphqls?"
|
||||
- "**.gql"
|
||||
# handlebars
|
||||
- "**.handlebars"
|
||||
- "**.hbs"
|
||||
# HTML
|
||||
- "**.mjml"
|
||||
- "**.html?"
|
||||
- "**.html.hl"
|
||||
- "**.st"
|
||||
- "**.xht"
|
||||
- "**.xhtml"
|
||||
# Vue
|
||||
- "**.vue"
|
||||
# JavaScript
|
||||
- "**.flow"
|
||||
- "**._?jsb?"
|
||||
- "**.bones"
|
||||
- "**.cjs"
|
||||
- "**.es6?"
|
||||
- "**.frag"
|
||||
- "**.gs"
|
||||
- "**.jake"
|
||||
- "**.jscad"
|
||||
- "**.jsfl"
|
||||
- "**.js[ms]"
|
||||
- "**.[mn]js"
|
||||
- "**.pac"
|
||||
- "**.wxs"
|
||||
- "**.[xs]s?js"
|
||||
- "**.xsjslib"
|
||||
# JSX
|
||||
- "**.jsx"
|
||||
# TypeScript
|
||||
- "**.ts"
|
||||
# TSX
|
||||
- "**.tsx"
|
||||
# JSON
|
||||
- "**/.eslintrc"
|
||||
- "**.json"
|
||||
- "**.avsc"
|
||||
- "**.geojson"
|
||||
- "**.gltf"
|
||||
- "**.har"
|
||||
- "**.ice"
|
||||
- "**.JSON-tmLanguage"
|
||||
- "**.mcmeta"
|
||||
- "**.tfstate"
|
||||
- "**.topojson"
|
||||
- "**.webapp"
|
||||
- "**.webmanifest"
|
||||
- "**.yyp?"
|
||||
# JSONC
|
||||
- "**/.babelrc"
|
||||
- "**/.jscsrc"
|
||||
- "**/.js[hl]intrc"
|
||||
- "**.jsonc"
|
||||
- "**.sublime-*"
|
||||
# JSON5
|
||||
- "**.json5"
|
||||
# Markdown
|
||||
- "**.mdx?"
|
||||
- "**.markdown"
|
||||
- "**.mk?down"
|
||||
- "**.mdwn"
|
||||
- "**.mkdn?"
|
||||
- "**.ronn"
|
||||
- "**.workbook"
|
||||
# YAML
|
||||
- "**/.clang-format"
|
||||
- "**/.clang-tidy"
|
||||
- "**/.gemrc"
|
||||
- "**/glide.lock"
|
||||
- "**.yml"
|
||||
- "**.mir"
|
||||
- "**.reek"
|
||||
- "**.rviz"
|
||||
- "**.sublime-syntax"
|
||||
- "**.syntax"
|
||||
- "**.yaml"
|
||||
- "**.yaml-tmlanguage"
|
||||
- "**.yaml.sed"
|
||||
- "**.yml.mysql"
|
||||
schedule:
|
||||
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to Prettier.
|
||||
- cron: "0 8 * * TUE"
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Prettier
|
||||
run: sudo npm install --global prettier
|
||||
|
||||
- name: Format with Prettier
|
||||
run: prettier --write .
|
||||
|
||||
- name: Check formatting
|
||||
run: git diff --color --exit-code
|
Reference in New Issue
Block a user