-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove CI scripts * add linkcheck workflow * linter * update config * fix md * fix lint issues * nightly/weekly workflows * remove DCO check as we already have the Github integrated one * build job * vale and updated styles * move images and assets to assets/ to exclude easily * fix vale errors * add case check * fix filename case Signed-off-by: Alexandra Tran <[email protected]> Signed-off-by: Nicolas MASSART <[email protected]> Co-authored-by: Nicolas MASSART <[email protected]>
- Loading branch information
1 parent
b9d08d2
commit b9e467f
Showing
289 changed files
with
8,084 additions
and
30,342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,178 +1,17 @@ | ||
--- | ||
version: 2.1 | ||
executors: | ||
python_executor: | ||
docker: | ||
- image: cimg/python:3.9 | ||
node_executor: | ||
docker: | ||
- image: cimg/node:lts | ||
shell_executor: | ||
docker: | ||
- image: cimg/base:2022.06 | ||
|
||
commands: | ||
install_node_dependencies: | ||
description: "Install Node dependencies" | ||
steps: | ||
- restore_cache: | ||
keys: | ||
- deps-{{ checksum ".circleci/config.yml" }}-{{ checksum "package-lock.json" }} | ||
- run: | ||
name: Install Node dependencies | ||
command: | | ||
npm ci | ||
save_node_cache: | ||
description: "Save Node dependencies" | ||
steps: | ||
- save_cache: | ||
paths: | ||
- ./node_modules | ||
key: deps-{{ checksum ".circleci/config.yml" }}-{{ checksum "package-lock.json" }} | ||
|
||
jobs: | ||
dco: | ||
executor: shell_executor | ||
steps: | ||
- checkout | ||
- run: | ||
name: check | ||
command: | | ||
status=0 | ||
while IFS= read -r -a line; do | ||
my_array+=( "$line" ) | ||
done < <( git branch -r | grep -v origin/HEAD ) | ||
for branch in "${my_array[@]}" | ||
do | ||
branch=$(echo "$branch" | xargs) | ||
echo "Checking commits in branch $branch for commits missing DCO..." | ||
while read -r results; do | ||
status=1 | ||
commit_hash="$(echo "$results" | cut -d' ' -f1)" | ||
>&2 echo "$commit_hash is missing Signed-off-by line." | ||
done < <(git log "$branch" --no-merges --pretty="%H %ae" --grep 'Signed-off-by' --invert-grep -- ) | ||
done | ||
exit $status | ||
# test the build with regular non-insider MkDocs Material theme for compatibility | ||
build: | ||
executor: python_executor | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- deps-{{ checksum ".circleci/config.yml" }}-{{ checksum "CI/requirements.txt" }} | ||
- run: | ||
name: install dependencies | ||
command: | | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
pip install -q -r CI/requirements-mkdocs-material.txt -r CI/requirements.txt | ||
- save_cache: | ||
paths: | ||
- ./venv | ||
key: deps-{{ checksum ".circleci/config.yml" }}-{{ checksum "CI/requirements.txt" }} | ||
- run: | ||
name: Run MkDocs | ||
command: | | ||
. venv/bin/activate | ||
mkdocs build -s | ||
vale: | ||
executor: python_executor | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install Vale | ||
command: | | ||
wget https://github.com/errata-ai/vale/releases/download/v2.6.0/vale_2.6.0_Linux_64-bit.tar.gz | ||
mkdir bin && tar -xvzf vale_2.6.0_Linux_64-bit.tar.gz -C bin vale | ||
- run: | ||
name: Run Vale | ||
command: | | ||
./bin/vale --config ./CI/vale/.vale.ini --glob='*.{md}' . | tee ./vale.out | ||
- store_artifacts: | ||
path: ./vale.out | ||
destination: ./vale.out | ||
|
||
linkchecker: | ||
executor: node_executor | ||
steps: | ||
- checkout | ||
- install_node_dependencies | ||
- run: | ||
name: Run markdown link checker | ||
command: | | ||
npm run test:links | ||
- save_node_cache | ||
- store_artifacts: | ||
path: ./linkchecker.out | ||
destination: linkchecker.out | ||
|
||
markdownlint: | ||
executor: node_executor | ||
steps: | ||
- checkout | ||
- install_node_dependencies | ||
- run: | ||
shell: /bin/bash #this is a non breaking command so it will always return success | ||
name: Run Markdownlint info checks | ||
command: | | ||
npm run test:markdown:info | ||
- run: | ||
name: Run Markdownlint | ||
command: | | ||
npm run test:markdown | ||
- save_node_cache | ||
- store_artifacts: | ||
path: ./markdownlint.out | ||
destination: ./markdownlint.out | ||
- store_artifacts: | ||
path: ./markdownlint_info.out | ||
destination: ./markdownlint_info.out | ||
|
||
repolint: | ||
executor: node_executor | ||
dummy: | ||
docker: | ||
- image: cimg/base:2022.06 | ||
steps: | ||
- checkout | ||
- install_node_dependencies | ||
- run: | ||
shell: /bin/bash #this is a non breaking command so it will always return success | ||
name: Run repolinter | ||
command: | | ||
npm run lint:repo | ||
- save_node_cache | ||
name: dummy | ||
command: echo "dummy step to prevent Circle from failing" | ||
|
||
workflows: | ||
version: 2 | ||
default: | ||
jobs: | ||
- dco | ||
- build | ||
- vale | ||
- markdownlint | ||
- linkchecker | ||
- repolint | ||
|
||
nightly: | ||
triggers: | ||
- schedule: # GMT | ||
cron: "0 0 * * *" | ||
filters: | ||
branches: | ||
only: | ||
- main | ||
jobs: | ||
- linkchecker | ||
|
||
weekly: | ||
triggers: | ||
- schedule: | ||
cron: "0 0 * * 0" | ||
filters: | ||
branches: | ||
only: | ||
- main | ||
jobs: | ||
- repolint | ||
- dummy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
--- | ||
name: Build without insider | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
name: Run build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# Full git history is needed to get a proper list of changed files within `super-linter` | ||
fetch-depth: 0 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' # caching pip dependencies | ||
|
||
- name: Install dependencies | ||
shell: sh | ||
run: pip install -q -r CI/requirements-mkdocs-material.txt -r CI/requirements.txt | ||
|
||
- name: MkDocs Material non insider build | ||
shell: sh | ||
run: mkdocs build -s | ||
|
||
- name: Site artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: site-no-insider | ||
path: site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: Check file name case | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: case-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Check file name case | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check pages file name case | ||
shell: sh | ||
run: | | ||
echo "Testing file case in docs." | ||
passed=true | ||
for filename in $(find docs -name "*.md" | ( ! grep -P -v "^[[:lower:][:digit:]\/\-_]+\.md$" )) | ||
do | ||
echo "$filename" | ||
echo "::error file=$filename ::File path must be only lowercase letters, digits, - (dash) and _ (underscore)" | ||
passed=false | ||
done; | ||
if [ "$passed" = false ] ; then | ||
echo "::error ::Some files path are incorrect. Check error annotations in the pull request." | ||
echo "Correct example: my-folder/my-file-name_new2.md" | ||
echo "Wrong example: My-Folder/MyFile-NAME.old.md" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
--- | ||
name: Verify links | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: links-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
name: Run check | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout tools repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Test changed files links | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
use-quiet-mode: yes | ||
use-verbose-mode: yes | ||
check-modified-files-only: yes | ||
base-branch: main | ||
config-file: ./CI/linkchecker/link_check_conf.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
--- | ||
name: Lint Code Base | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: lint-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
name: Run check | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# Full git history is needed to get a proper list of changed files within `super-linter` | ||
fetch-depth: 0 | ||
|
||
- name: Lint Code Base | ||
uses: github/super-linter/slim@v4 | ||
env: | ||
# VALIDATE_ALL_CODEBASE: "false" | ||
DEFAULT_BRANCH: main | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
LINTER_RULES_PATH: ./CI/lint | ||
MARKDOWN_CONFIG_FILE: .markdown.yml | ||
LOG_LEVEL: ERROR | ||
CSS_FILE_NAME: .stylelintrc.yaml | ||
FILTER_REGEX_EXCLUDE: (/CI/vale/vale_styles/*|LICENSE) | ||
VALIDATE_JAVASCRIPT_STANDARD: false | ||
VALIDATE_PYTHON: 'false' | ||
IGNORE_GITIGNORED_FILES: 'true' |
Oops, something went wrong.