-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
90 additions
and
32 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint-shellcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Runs shell script static analysis | ||
run: | | ||
sudo apt-get install shellcheck | ||
./run-tests.sh --check-shellscript | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Ruby 2.6 | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6.x | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14" | ||
|
||
- name: Install project dependences | ||
run: | | ||
sudo apt-get update -y | ||
gem install awesome_bot | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Lint docs | ||
run: ./run-tests.sh --check-docstyle | ||
|
||
- name: Build docs | ||
run: ./run-tests.sh --build-docs |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,6 +1,37 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
npx -p markdownlint-cli markdownlint docs/* && \ | ||
awesome_bot --allow-dupe --skip-save-results --allow-redirect docs/**/*.md && \ | ||
mkdocs build -v && \ | ||
rm -rf site/ | ||
# Quit on errors | ||
set -o errexit | ||
|
||
# Quit on unbound symbols | ||
set -o nounset | ||
|
||
check_script () { | ||
shellcheck run-tests.sh | ||
} | ||
|
||
check_docstyle () { | ||
npx -p markdownlint-cli markdownlint docs/* | ||
awesome_bot --allow-dupe --skip-save-results --allow-redirect docs/**/*.md | ||
} | ||
|
||
build_docs () { | ||
mkdocs build -v | ||
rm -rf site/ | ||
} | ||
|
||
if [ $# -eq 0 ]; then | ||
check_script | ||
check_docstyle | ||
build_docs | ||
fi | ||
|
||
for arg in "$@" | ||
do | ||
case $arg in | ||
--check-shellscript) check_script;; | ||
--check-docstyle) check_docstyle;; | ||
--build-docs) build_docs;; | ||
*) | ||
esac | ||
done |