There was still an explicit import of magic
in `wfexs_backend.utils…
#119
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: schemas-doc-generator | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
json-schema-validation: | |
runs-on: ubuntu-latest | |
name: JSON Schema validation through pre-commit | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pre-commit/[email protected] | |
with: | |
extra_args: --all -c .pre-commit-config.yaml jsonschema_dir_validate | |
update_docs: | |
runs-on: ubuntu-latest | |
name: Update documentation if all worked properly | |
needs: | |
- json-schema-validation | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 100 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
cache: 'pip' | |
architecture: x64 | |
cache-dependency-path: 'dev-requirements.txt' | |
- name: Install documentation generator dependencies (development) | |
run: | | |
pip install -r dev-requirements.txt | |
- name: Generate HTML documentation from internal JSON Schemas | |
id: doc-generate-html-if-changed | |
run: | | |
development-scripts/regenerate_schema_docs_html.bash wfexs_backend/schemas development-docs/schemas | |
- name: Generate MD documentation from internal JSON Schemas | |
id: doc-generate-md-if-changed | |
run: | | |
development-scripts/regenerate_schema_docs_md.bash wfexs_backend/schemas development-docs/schemas | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
if: steps.doc-generate-md-if-changed.outcome == 'success' || steps.doc-generate-html-if-changed.outcome == 'success' | |
with: | |
title: Updated schemas documentation (triggered by ${{ github.sha }}) | |
branch: create-pull-request/patch-schema-docs | |
delete-branch: true | |
commit-message: "[create-pull-request] Automatically commit updated contents (generated schemas documentation)" | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |