Skip to content

Commit c1cda5f

Browse files
committed
ci: add github actions for checking docs and antlr grammar
1 parent f7058d8 commit c1cda5f

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: ANTLR Grammar Check
2+
3+
on:
4+
push:
5+
paths:
6+
- 'docs/grammar/**'
7+
pull_request:
8+
paths:
9+
- 'docs/grammar/**'
10+
11+
jobs:
12+
chk_antlr_grammar:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-java@v4
17+
with:
18+
distribution: 'temurin'
19+
java-version: '17'
20+
21+
- name: Run ANTLR grammar tests
22+
run: scripts/test_antlr_grammar.sh

.github/workflows/check-docs.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Documentation Checks and Build
2+
3+
on:
4+
push:
5+
paths:
6+
- 'docs/**'
7+
pull_request:
8+
paths:
9+
- 'docs/**'
10+
11+
jobs:
12+
chk_spelling:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install --user codespell
26+
27+
- name: Check spelling
28+
run: ~/.local/bin/codespell
29+
30+
chk_pylint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.x'
40+
41+
- name: Install Python dependencies
42+
run: |
43+
pip install --user pyyaml jsonschema pytest pylint
44+
45+
- name: Check pylint version
46+
run: pylint --version
47+
48+
- name: Linting Python Scripts
49+
run: scripts/pylint_all.py
50+
51+
chk_docs_pragma_min_version:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout code
55+
uses: actions/checkout@v4
56+
57+
- name: Check docs pragma version
58+
run: scripts/docs_version_pragma_check.sh
59+
60+
b_docs:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout code
64+
uses: actions/checkout@v4
65+
66+
- name: Store commit hash and prerelease
67+
run: |
68+
if [[ $GITHUB_REF == refs/heads/release || $GITHUB_REF == refs/tags/* ]]; then
69+
echo -n > prerelease.txt
70+
else
71+
date -u +"nightly.%Y.%-m.%-d" > prerelease.txt
72+
fi
73+
echo -n "$GITHUB_SHA" > commit_hash.txt
74+
75+
- name: Build documentation
76+
run: docs/docs.sh
77+
78+
- name: Upload documentation artifacts
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: docs-html
82+
path: docs/_build/html/

0 commit comments

Comments
 (0)