-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from unipoll/development
Pydantic 2, better cli, docker-compose
- Loading branch information
Showing
35 changed files
with
510 additions
and
34,039 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 |
---|---|---|
@@ -1,20 +1,40 @@ | ||
name: Automatically build Postman documentation | ||
|
||
on: | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
versionName: | ||
description: 'The new version name' | ||
required: true | ||
default: '1.0.0' | ||
releaseNotes: | ||
description: 'The new version release notes' | ||
required: false | ||
default: '' | ||
|
||
jobs: | ||
automated-api-tests: | ||
runs-on: arc-runner-k8s | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Postman CLI | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
run: | | ||
curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh | ||
- name: Login to Postman CLI | ||
run: postman login --with-api-key ${{ secrets.POSTMAN_API_KEY }} | ||
- name: Run API tests | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Get OpenAPI schema | ||
run: | | ||
postman collection run "${{ github.workspace }}/postman/collections/Automations: API-First Workflows.json" -e "19614303-61306d0f-9f72-418f-80ba-1561218563c9" --integration-id "129783-${{ github.run_id }}" | ||
# Lint your API using Postman CLI | ||
postman api lint --integration-id 129783 | ||
python main.py get-openapi | ||
- name: Push OpenAPI to Postman | ||
id: pushApi | ||
uses: davidespihernandez/push-openapi-to-postman@v1 | ||
with: | ||
path-to-definition: ./openapi.json | ||
postman-api-key: ${{ secrets.POSTMAN_API_KEY }} | ||
api-id: ${{ vars.POSTMAN_API_ID }} | ||
api-path-to-file-name: openapi.json | ||
version-name: ${{ github.event.inputs.versionName }} | ||
release-notes: ${{ github.event.inputs.releaseNotes }} |
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
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
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,16 @@ | ||
services: | ||
mongodb: | ||
image: 'mongo:latest' | ||
ports: | ||
- '27017:27017' | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: root | ||
MONGO_INITDB_ROOT_PASSWORD: changeme | ||
|
||
api: | ||
build: . | ||
ports: | ||
- '80:8000' | ||
environment: | ||
MONGODB_URL: mongodb://root:changeme@mongodb:27017 | ||
PORT: 8000 |
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
|
||
if __name__ == "__main__": | ||
app.run() | ||
app.cli_entry_point() |
Oops, something went wrong.