From 6dd6d326022b33a986272b37923665220d73dbc5 Mon Sep 17 00:00:00 2001 From: Mahmoud Alkhraishi Date: Fri, 21 Jun 2024 12:10:24 -0400 Subject: [PATCH] update ci/cd scripts and add openapi validate --- .github/workflows/cd.yml | 10 +++++----- .github/workflows/ci.yml | 11 +++++++---- package.json | 3 ++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8cd867616..c82dc9409 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -11,12 +11,12 @@ jobs: name: Publish unstable release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Use Node 16 - uses: actions/setup-node@v3 + - name: Use Node 20 + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 20.x cache: 'npm' - name: Install @@ -27,7 +27,7 @@ jobs: - name: Test run: npm run test - + - name: Bundle run: npm run bundle diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3a94a086..35f0b700c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,11 +7,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Begin CI... - uses: actions/checkout@v3 - - name: Use Node 16 - uses: actions/setup-node@v3 + uses: actions/checkout@v4 + - name: Use Node 20 + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 20.x cache: 'npm' - name: Install run: npm ci @@ -21,3 +21,6 @@ jobs: - name: Jest run: cd packages/traceability-schemas && npm run test + + - name: validate OpenApi Bundle + run: npm run validate diff --git a/package.json b/package.json index 2eeb50aad..8cbadac97 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "test": "lerna run test", "bundle": "swagger-cli bundle ./docs/openapi/openapi.yml -o ./docs/openapi/openapi.bundled.json -r", "build": "lerna run build", - "serve": "npx serve ./docs" + "serve": "npx serve ./docs", + "validate": "swagger-cli validate ./docs/openapi/openapi.yml" }, "devDependencies": { "eslint": "^8.40.0",