-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add CI for testing OpenAPI examples (#340)
- Loading branch information
1 parent
59092a0
commit 299cfbb
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test OpenAPI examples | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- 'core/openapi/ogcapi-records-1-example-ref-buildingblocks-bundle.yaml' | ||
- 'core/openapi/ogcapi-records-1-example-ref-schema-repo.yaml' | ||
|
||
jobs: | ||
test-build-openapi-bundle: | ||
name: Test OpenAPI examples | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup npm | ||
uses: actions/setup-node@v2 | ||
- name: Install dependencies | ||
run: npm install -g @apidevtools/swagger-cli | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Generate OpenAPI bundle | ||
run: | | ||
cd core/openapi | ||
swagger-cli validate ogcapi-records-1-example-ref-buildingblocks-bundle.yaml | ||
swagger-cli validate ogcapi-records-1-example-ref-schema-repo.yaml |