Add spectral action for openapi #2
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: Validate OpenAPI with Spectral | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
name: Run Spectral | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the repository | |
- name: Check out the repository | |
uses: actions/[email protected] | |
- name: Set up Python 3.10 | |
uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Upgrade pip | |
run: | | |
pip install --constraint=.github/workflows/constraints.txt pip | |
pip --version | |
- name: Install Poetry | |
run: | | |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry | |
poetry --version | |
- name: Install fastgeoapi CLI | |
run: | | |
poetry install | |
fastgeoapi openapi | |
# Run Spectral | |
- name: Run Spectral | |
uses: stoplightio/spectral-action@latest | |
with: | |
file_glob: 'pygeoapi-openapi.json' |