-
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 #100 from quaternionmedia/pytest
🧪 Pytest
- Loading branch information
Showing
24 changed files
with
296 additions
and
201 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,26 @@ | ||
name: ⚗️ CI tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
api_tests: | ||
name: 🐢 API tests | ||
uses: ./.github/workflows/nox.yml | ||
with: | ||
args: coverage | ||
|
||
lint: | ||
name: 👖 Linter | ||
uses: ./.github/workflows/nox.yml | ||
with: | ||
args: lint | ||
|
||
format: | ||
name: ⬛ Black Formatter | ||
uses: ./.github/workflows/nox.yml | ||
with: | ||
args: blacken | ||
|
||
# integration_tests: | ||
# name: 🔏 Integration tests | ||
# uses: ./.github/workflows/cypress.yml |
8 changes: 4 additions & 4 deletions
8
.github/workflows/app_test.yml → .github/workflows/cypress.yml
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,30 @@ | ||
name: 🛢️ nox | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
args: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
run_nox: | ||
name: 🛢️ nox | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 📰 Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: 🐍 Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: 🏗️ Setup testing environment | ||
run: pip3 install -r tests/requirements-tests.txt | ||
|
||
- name: 🧪 Run nox test suite | ||
run: nox -f tests/noxfile.py -s ${{ inputs.args }} |
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,63 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Alfred", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "uvicorn", | ||
"cwd": "${workspaceFolder}/alfred", | ||
"args": ["main:app", "--host", "0.0.0.0", "--port", "9000", "--reload"], | ||
"env": { | ||
"CELERY_BROKER": "mongodb://localhost:27017/celery", | ||
"CELERY_BACKEND": "mongodb://localhost:27017/celery", | ||
"DB_URL": "mongodb://localhost:27017", | ||
"DB_NAME": "alfred", | ||
"GOOGLE_APPLICATION_CREDENTIALS": "/cred.json", | ||
"ALFRED_SECRET_KEY": "ALFRED_SECRET_KEY" | ||
}, | ||
"jinja": false, | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Otto", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "uvicorn", | ||
"cwd": "${workspaceFolder}/alfred/otto/", | ||
"args": [ | ||
"otto.preview:previewAPI", | ||
"--host", | ||
"0.0.0.0", | ||
"--port", | ||
"9000", | ||
"--reload" | ||
], | ||
"jinja": false, | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Alfred Tests", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "pytest", | ||
"cwd": "${workspaceFolder}", | ||
"args": ["-v"], | ||
"jinja": false, | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Otto Tests", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "pytest", | ||
"cwd": "${workspaceFolder}/alfred/otto/", | ||
"args": ["-v"], | ||
"jinja": false, | ||
"justMyCode": true | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.1.3' | ||
__version__ = '0.2.0' |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from _version import __version__ | ||
from alfred._version import __version__ | ||
|
||
title = """Alfred API""" | ||
|
||
|
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
Submodule otto
updated
51 files
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.