-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): separate the swagger validation in own runner plus improvement
- Loading branch information
1 parent
61299b2
commit 9727dc7
Showing
3 changed files
with
61 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Run API | ||
|
||
description: Starts and waits for an API running instance | ||
|
||
inputs: | ||
launch_darkly_sdk_key: | ||
description: 'The Launch Darkly SDK key to use' | ||
required: false | ||
default: '' | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Start API | ||
env: | ||
IS_IN_MEMORY_CLUSTER_MODE_ENABLED: true | ||
LAUNCH_DARKLY_SDK_KEY: ${{ inputs.launch_darkly_sdk_key }} | ||
run: cd apps/api && pnpm start:test & | ||
|
||
- name: Wait on API | ||
run: wait-on --timeout=180000 http://localhost:1336/v1/health-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Validate Swagger | ||
|
||
description: Validates the swagger from the API | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Get swagger json as file | ||
run: | | ||
curl -o swagger.json http://localhost:1336/api-json | ||
- uses: char0n/swagger-editor-validate@v1 | ||
with: | ||
definition-file: swagger.json | ||
|
||
- name: Kill port for api 1336 for unit tests | ||
run: sudo kill -9 $(sudo lsof -t -i:1336) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters