Skip to content

Commit

Permalink
Addingn workflows and updating script
Browse files Browse the repository at this point in the history
  • Loading branch information
supremar committed Aug 3, 2023
1 parent 2220804 commit 6c833d3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, and execute run scripts on the repository. This is based on the default Node.js actions.

name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i
- run: find openapi -name '*.json' -exec npm run-script bundle-deref -- {} \;
- run: find openapi -name '*.json' -exec npm run-script lint-redocly -- {} \;
- run: find openapi -name '*.json' -exec npm run-script lint-spectral -- {} \;
- run: find openapi -name '*.json' -exec npm run-script lint-openapi -- {} \;
- run: find openapi -name '*.json' -exec npm run-script codegen-java -- {} \; -exec rm -rf generated/java \;
- run: find openapi -name '*.json' -exec npm run-script codegen-typescript-node -- {} \; -exec rm -rf generated/typescript-node \;
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint-redocly": "redocly --format summary lint",
"lint-spectral": "spectral --format pretty lint",
"lint-openapi": "openapi-generator-cli validate -i",
"codegen-java": "openapi-generator-cli generate -g java -o generated/java -i",
"codegen-typescript-node": "openapi-generator-cli generate -g typescript-node -o generated/typescript-node -i"
"codegen-java": "openapi-generator-cli generate --skip-validate-spec -g java -o generated/java -i",
"codegen-typescript-node": "openapi-generator-cli generate --skip-validate-spec -g typescript-node -o generated/typescript-node -i"
}
}

0 comments on commit 6c833d3

Please sign in to comment.