|
|
@ -28,6 +28,33 @@ concurrency: |
|
|
|
cancel-in-progress: true |
|
|
|
cancel-in-progress: true |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
|
|
|
|
validate-swagger-json: |
|
|
|
|
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
|
|
|
|
timeout-minutes: 10 |
|
|
|
|
|
|
|
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} |
|
|
|
|
|
|
|
steps: |
|
|
|
|
|
|
|
- name: Checkout |
|
|
|
|
|
|
|
uses: actions/checkout@v3 |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
fetch-depth: 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# enable after fixing all validation errors |
|
|
|
|
|
|
|
# - name: Validate OpenAPI definition |
|
|
|
|
|
|
|
# uses: char0n/swagger-editor-validate@v1 |
|
|
|
|
|
|
|
# with: |
|
|
|
|
|
|
|
# swagger-editor-url: http://localhost/ |
|
|
|
|
|
|
|
# definition-file: packages/nocodb/src/schema/swagger.json |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Validate Swagger JSON |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
if ! jq empty packages/nocodb/src/schema/swagger.json; then |
|
|
|
|
|
|
|
echo "swagger.json file is not valid JSON" |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
if ! jq empty packages/nocodb/src/schema/swagger-v2.json; then |
|
|
|
|
|
|
|
echo "swaggerv2.json file is not valid JSON" |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
unit-tests: |
|
|
|
unit-tests: |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
timeout-minutes: 40 |
|
|
|
timeout-minutes: 40 |
|
|
|