forked from loafle/openapi-generator-original
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
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pip install nose
|
||||
- pip install -r test-requirements.txt
|
||||
{{#useNose}}
|
||||
- nosetests
|
||||
{{/useNose}}
|
||||
{{^useNose}}
|
||||
- pytest --cov={{{packageName}}}
|
||||
{{/useNose}}
|
||||
|
||||
nosetest-2.7:
|
||||
extends: .nosetest
|
||||
|
@ -10,6 +10,13 @@ python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
# 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
|
||||
{{#useNose}}
|
||||
script: nosetests
|
||||
{{/useNose}}
|
||||
{{^useNose}}
|
||||
script: pytest --cov={{{packageName}}}
|
||||
{{/useNose}}
|
||||
|
@ -7,8 +7,8 @@ stages:
|
||||
stage: test
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pip install nose
|
||||
- nosetests
|
||||
- pip install -r test-requirements.txt
|
||||
- pytest --cov=petstore_api
|
||||
|
||||
nosetest-2.7:
|
||||
extends: .nosetest
|
||||
|
@ -10,6 +10,8 @@ python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
# 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
|
||||
script: nosetests
|
||||
script: pytest --cov=petstore_api
|
||||
|
@ -7,8 +7,8 @@ stages:
|
||||
stage: test
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pip install nose
|
||||
- nosetests
|
||||
- pip install -r test-requirements.txt
|
||||
- pytest --cov=petstore_api
|
||||
|
||||
nosetest-2.7:
|
||||
extends: .nosetest
|
||||
|
@ -10,6 +10,8 @@ python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
# 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
|
||||
script: nosetests
|
||||
script: pytest --cov=petstore_api
|
||||
|
@ -7,8 +7,8 @@ stages:
|
||||
stage: test
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pip install nose
|
||||
- nosetests
|
||||
- pip install -r test-requirements.txt
|
||||
- pytest --cov=petstore_api
|
||||
|
||||
nosetest-2.7:
|
||||
extends: .nosetest
|
||||
|
@ -10,6 +10,8 @@ python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
# 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
|
||||
script: nosetests
|
||||
script: pytest --cov=petstore_api
|
||||
|
@ -7,8 +7,8 @@ stages:
|
||||
stage: test
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pip install nose
|
||||
- nosetests
|
||||
- pip install -r test-requirements.txt
|
||||
- pytest --cov=petstore_api
|
||||
|
||||
nosetest-2.7:
|
||||
extends: .nosetest
|
||||
|
@ -10,6 +10,8 @@ python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
# 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
|
||||
script: nosetests
|
||||
script: pytest --cov=petstore_api
|
||||
|
@ -7,8 +7,8 @@ stages:
|
||||
stage: test
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pip install nose
|
||||
- nosetests
|
||||
- pip install -r test-requirements.txt
|
||||
- pytest --cov=petstore_api
|
||||
|
||||
nosetest-2.7:
|
||||
extends: .nosetest
|
||||
|
@ -10,6 +10,8 @@ python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
# 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
|
||||
script: nosetests
|
||||
script: pytest --cov=petstore_api
|
||||
|
@ -7,8 +7,8 @@ stages:
|
||||
stage: test
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- pip install nose
|
||||
- nosetests
|
||||
- pip install -r test-requirements.txt
|
||||
- pytest --cov=petstore_api
|
||||
|
||||
nosetest-2.7:
|
||||
extends: .nosetest
|
||||
|
@ -10,6 +10,8 @@ python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
# 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
|
||||
script: nosetests
|
||||
script: pytest --cov=petstore_api
|
||||
|
Loading…
x
Reference in New Issue
Block a user