From ecae2872496994d0490b656f252ddf02924a68e6 Mon Sep 17 00:00:00 2001 From: SarahCoilAccount Date: Fri, 4 Nov 2022 12:57:21 +0200 Subject: [PATCH] chore: add validation for the OpenAPI specs to GitHub Actions --- .github/workflows/lint_test_build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/lint_test_build.yml b/.github/workflows/lint_test_build.yml index c5848f174e..84f997c42f 100644 --- a/.github/workflows/lint_test_build.yml +++ b/.github/workflows/lint_test_build.yml @@ -44,9 +44,17 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 - uses: ./.github/workflows/rafiki/env-setup - run: pnpm --filter openapi build - run: pnpm --filter auth test + - run: pnpm --filter auth run fetch-schemas + - name: AsyncAPI extension + run: | + echo "{\"extends\":[\"spectral:oas\",\"spectral:asyncapi\"]}" >> .spectral.json + - name: Validate Open API specs + run: | + npx @stoplight/spectral-cli lint ./packages/auth/openapi/*-server.yaml openapi: runs-on: ubuntu-latest