mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
Respect usenose for Python CI (#5376)
* python: Respect useNose option in generated CI templates Travis and Gitlab CI now use nosetests or pytests depending on the "useNose" option that is passed. * python: Update CI samples They now respect the "useNose" option
This commit is contained in:
parent
fa5beeecd0
commit
33483b2f20
@ -7,8 +7,13 @@ stages:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install nose
|
- pip install -r test-requirements.txt
|
||||||
|
{{#useNose}}
|
||||||
- nosetests
|
- nosetests
|
||||||
|
{{/useNose}}
|
||||||
|
{{^useNose}}
|
||||||
|
- pytest --cov={{{packageName}}}
|
||||||
|
{{/useNose}}
|
||||||
|
|
||||||
nosetest-2.7:
|
nosetest-2.7:
|
||||||
extends: .nosetest
|
extends: .nosetest
|
||||||
|
@ -10,6 +10,13 @@ python:
|
|||||||
- "3.7"
|
- "3.7"
|
||||||
- "3.8"
|
- "3.8"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install: "pip install -r requirements.txt"
|
install:
|
||||||
|
- "pip install -r requirements.txt"
|
||||||
|
- "pip install -r test-requirements.txt"
|
||||||
# command to run tests
|
# command to run tests
|
||||||
|
{{#useNose}}
|
||||||
script: nosetests
|
script: nosetests
|
||||||
|
{{/useNose}}
|
||||||
|
{{^useNose}}
|
||||||
|
script: pytest --cov={{{packageName}}}
|
||||||
|
{{/useNose}}
|
||||||
|
@ -7,8 +7,8 @@ stages:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install nose
|
- pip install -r test-requirements.txt
|
||||||
- nosetests
|
- pytest --cov=petstore_api
|
||||||
|
|
||||||
nosetest-2.7:
|
nosetest-2.7:
|
||||||
extends: .nosetest
|
extends: .nosetest
|
||||||
|
@ -10,6 +10,8 @@ python:
|
|||||||
- "3.7"
|
- "3.7"
|
||||||
- "3.8"
|
- "3.8"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install: "pip install -r requirements.txt"
|
install:
|
||||||
|
- "pip install -r requirements.txt"
|
||||||
|
- "pip install -r test-requirements.txt"
|
||||||
# command to run tests
|
# command to run tests
|
||||||
script: nosetests
|
script: pytest --cov=petstore_api
|
||||||
|
@ -7,8 +7,8 @@ stages:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install nose
|
- pip install -r test-requirements.txt
|
||||||
- nosetests
|
- pytest --cov=petstore_api
|
||||||
|
|
||||||
nosetest-2.7:
|
nosetest-2.7:
|
||||||
extends: .nosetest
|
extends: .nosetest
|
||||||
|
@ -10,6 +10,8 @@ python:
|
|||||||
- "3.7"
|
- "3.7"
|
||||||
- "3.8"
|
- "3.8"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install: "pip install -r requirements.txt"
|
install:
|
||||||
|
- "pip install -r requirements.txt"
|
||||||
|
- "pip install -r test-requirements.txt"
|
||||||
# command to run tests
|
# command to run tests
|
||||||
script: nosetests
|
script: pytest --cov=petstore_api
|
||||||
|
@ -7,8 +7,8 @@ stages:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install nose
|
- pip install -r test-requirements.txt
|
||||||
- nosetests
|
- pytest --cov=petstore_api
|
||||||
|
|
||||||
nosetest-2.7:
|
nosetest-2.7:
|
||||||
extends: .nosetest
|
extends: .nosetest
|
||||||
|
@ -10,6 +10,8 @@ python:
|
|||||||
- "3.7"
|
- "3.7"
|
||||||
- "3.8"
|
- "3.8"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install: "pip install -r requirements.txt"
|
install:
|
||||||
|
- "pip install -r requirements.txt"
|
||||||
|
- "pip install -r test-requirements.txt"
|
||||||
# command to run tests
|
# command to run tests
|
||||||
script: nosetests
|
script: pytest --cov=petstore_api
|
||||||
|
@ -7,8 +7,8 @@ stages:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install nose
|
- pip install -r test-requirements.txt
|
||||||
- nosetests
|
- pytest --cov=petstore_api
|
||||||
|
|
||||||
nosetest-2.7:
|
nosetest-2.7:
|
||||||
extends: .nosetest
|
extends: .nosetest
|
||||||
|
@ -10,6 +10,8 @@ python:
|
|||||||
- "3.7"
|
- "3.7"
|
||||||
- "3.8"
|
- "3.8"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install: "pip install -r requirements.txt"
|
install:
|
||||||
|
- "pip install -r requirements.txt"
|
||||||
|
- "pip install -r test-requirements.txt"
|
||||||
# command to run tests
|
# command to run tests
|
||||||
script: nosetests
|
script: pytest --cov=petstore_api
|
||||||
|
@ -7,8 +7,8 @@ stages:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install nose
|
- pip install -r test-requirements.txt
|
||||||
- nosetests
|
- pytest --cov=petstore_api
|
||||||
|
|
||||||
nosetest-2.7:
|
nosetest-2.7:
|
||||||
extends: .nosetest
|
extends: .nosetest
|
||||||
|
@ -10,6 +10,8 @@ python:
|
|||||||
- "3.7"
|
- "3.7"
|
||||||
- "3.8"
|
- "3.8"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install: "pip install -r requirements.txt"
|
install:
|
||||||
|
- "pip install -r requirements.txt"
|
||||||
|
- "pip install -r test-requirements.txt"
|
||||||
# command to run tests
|
# command to run tests
|
||||||
script: nosetests
|
script: pytest --cov=petstore_api
|
||||||
|
@ -7,8 +7,8 @@ stages:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install nose
|
- pip install -r test-requirements.txt
|
||||||
- nosetests
|
- pytest --cov=petstore_api
|
||||||
|
|
||||||
nosetest-2.7:
|
nosetest-2.7:
|
||||||
extends: .nosetest
|
extends: .nosetest
|
||||||
|
@ -10,6 +10,8 @@ python:
|
|||||||
- "3.7"
|
- "3.7"
|
||||||
- "3.8"
|
- "3.8"
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install: "pip install -r requirements.txt"
|
install:
|
||||||
|
- "pip install -r requirements.txt"
|
||||||
|
- "pip install -r test-requirements.txt"
|
||||||
# command to run tests
|
# command to run tests
|
||||||
script: nosetests
|
script: pytest --cov=petstore_api
|
||||||
|
Loading…
x
Reference in New Issue
Block a user