-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.94 KB
/
Copy pathdocs.yml
File metadata and controls
55 lines (51 loc) · 1.94 KB
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
name: Documentation
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
name: Markdown and schema checks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@v24.2.0
with:
config: .github/markdownlint.jsonc
globs: |
README.md
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
SECURITY.md
.github/**/*.md
docs/*.md
docs/**/*.md
skills/**/*.md
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Install documentation dependencies
run: python -m pip install -e ".[docs]"
- name: Build documentation
run: mkdocs build --strict
- name: Validate feature schema example
run: |
python -m json.tool schemas/electrace.features.v1.schema.json > /dev/null
python -m json.tool docs/examples/electrace.features.v1.example.json > /dev/null
python -c 'import json; from jsonschema import Draft202012Validator as V; s=json.load(open("schemas/electrace.features.v1.schema.json")); d=json.load(open("docs/examples/electrace.features.v1.example.json")); V.check_schema(s); V(s).validate(d)'
- name: Generate and validate demo analysis
run: |
electrace demo --output .ci-demo
python -m json.tool .ci-demo/electrace-results/analysis.json > /dev/null
python -c 'import json; from jsonschema import Draft202012Validator as V; s=json.load(open("schemas/analysis-v0.1.schema.json")); d=json.load(open(".ci-demo/electrace-results/analysis.json")); V.check_schema(s); V(s).validate(d)'