Skip to content

Commit

Permalink
update ci/cd scripts and add openapi validate
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhraisha committed Jun 21, 2024
1 parent d680090 commit 6dd6d32
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,7 +27,7 @@ jobs:

- name: Test
run: npm run test

- name: Bundle
run: npm run bundle

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,3 +21,6 @@ jobs:

- name: Jest
run: cd packages/traceability-schemas && npm run test

- name: validate OpenApi Bundle
run: npm run validate
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 6dd6d32

Please sign in to comment.