From ad02b01987851bfb2233d601605849c1b07473f5 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Fri, 19 Jan 2024 19:30:53 -0500 Subject: [PATCH] add CI for testing OpenAPI examples --- .github/workflows/test-openapi-examples.yaml | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test-openapi-examples.yaml diff --git a/.github/workflows/test-openapi-examples.yaml b/.github/workflows/test-openapi-examples.yaml new file mode 100644 index 00000000..2bb17f9c --- /dev/null +++ b/.github/workflows/test-openapi-examples.yaml @@ -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