This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
Validate the generated documentation for sigopt/sigopt-server@refs/heads/main #1757
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: documentation validation | |
permissions: read-all | |
run-name: Validate the generated documentation for ${{ github.repository }}@${{ github.ref }} | |
on: | |
push: {} | |
env: | |
SIGOPT_SWAGGER_PATH: ./ | |
SIGOPT_SWAGGER_FILENAME: swagger.json | |
jobs: | |
generate-and-validate-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- run: pip install pipenv | |
- run: pipenv install --deploy --dev | |
- run: source .env && sudo ./tools/protobuf/install.sh "$PROTOBUF_VERSION" | |
- run: pipenv run ./tools/protobuf/compile.sh | |
- name: Generate swagger file | |
run: pipenv run env SIGOPT_SERVER_CONFIG_DIR=./config/circleci ./pp src/python/zigopt/api/documentation.py | |
- run: yarn install | |
- name: Check that swagger file exists and validate it with swagger validator | |
run: node ./ci/validate_swagger.js ./swagger.json |