This repository has been archived by the owner on May 15, 2024. It is now read-only.
Schema repo documentation #95
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
--- | |
name: CI tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
# Cancel running workflows when additional changes are pushed | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
check-linkml-schemas: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: pip | |
cache-dependency-path: | | |
requirements*.txt | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U setuptools wheel | |
pip install -r requirements.txt | |
pip freeze | |
- name: Run LinkML generators | |
run: | | |
for f in $(ls schemas/*); do | |
gen-pydantic -vvv --stacktrace $f | |
gen-json-schema -vvv --stacktrace $f | |
done | |
- name: Validate examples | |
run: | | |
for f in $(ls examples/extractor/*.yml); do | |
linkml-validate -s schemas/extractor.yml -C Extractor $f | |
done | |
for f in $(ls examples/filetype/*.yml); do | |
linkml-validate -s schemas/filetype.yml -C FileType $f | |
done | |
build-pages: | |
runs-on: ubuntu-latest | |
needs: [check-linkml-schemas] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: pip | |
cache-dependency-path: | | |
requirements*.txt | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U sphinx~=7.2 sphinx-rtd-theme~=1.3 myst-parser~=2.0 | |
pip install -r requirements.txt | |
pip freeze | |
- name: Build FileType docs | |
run: | | |
gen-doc schemas/filetype.yml -d docs/source/gen-doc | |
- name: Build Extractor docs | |
run: | | |
gen-doc schemas/extractor.yml -d docs/source/gen-doc | |
- name: Build Sphinx docs | |
run: | | |
sphinx-build -b html docs/source public/master |