-
Notifications
You must be signed in to change notification settings - Fork 89
60 lines (53 loc) · 1.68 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Check files
on:
pull_request:
types:
- opened
- synchronize
push:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check out source files
uses: actions/checkout@v3
- name: Get a list of changed files
uses: jitterbit/get-changed-files@v1
continue-on-error: true
id: changed_files
- name: Filter changed files by extension
run: |
EXTENSIONS="md"
PATH_PREFIX="source"
for FILE in ${{ steps.changed_files.outputs.all }}; do
if [[ $FILE = $PATH_PREFIX* ]]; then
for EXT in $EXTENSIONS; do
if [[ ${FILE##*.} == $EXT ]]; then
SCAN_FILES="$SCAN_FILES $FILE"; continue
fi
done
fi
done
echo "scan_files=$SCAN_FILES" >> $GITHUB_ENV
- name: Run initial tests
run: ./tests.sh ${{ steps.changed_files.outputs.all }}
- name: Check files using markdownlint
uses: actionshub/markdownlint@main
with:
path: source
- name: Spellcheck
if: env.scan_files != ''
uses: rojopolis/[email protected]
with:
task_name: Markdown
source_files: ${{ env.scan_files }}
- name: Render docs to HTML
uses: ammaraskar/sphinx-action@master
with:
pre-build-command: python -m pip install recommonmark
docs-folder: "source/"
build-command: "sphinx-build -n -d build/doctrees . build/html"
- name: Add in compiled CSS and Javascript
run: |
make build/html/_static/css/app.css
make build/html/_static/app.js