Update */src/.cicd/test.sh
This commit is contained in:
parent
5084c38283
commit
cad88bf24e
|
@ -2,21 +2,14 @@
|
|||
|
||||
|
||||
if [ "${TEST_TARGET:-}" = "INTEGRATION" ]; then
|
||||
# Execute your command here
|
||||
/usr/src/app/.venv/bin/gunicorn manage:app
|
||||
else
|
||||
## pytest
|
||||
python -m pytest "src/tests" --junitxml=report.xml
|
||||
|
||||
## Coverage
|
||||
python -m pytest "src/tests" -p no:warnings --cov="src" --cov-report xml
|
||||
|
||||
|
||||
## Linting
|
||||
flake8 src --extend-ignore E221 --extend-ignore E501
|
||||
# black src --check
|
||||
# isort src --check
|
||||
black src --check
|
||||
isort . --src-path src --check --profile black
|
||||
|
||||
## Security
|
||||
# bandit -c .bandit.yml -r .
|
||||
fi
|
||||
|
|
|
@ -4,18 +4,12 @@
|
|||
if [ "${TEST_TARGET:-}" = "INTEGRATION" ]; then
|
||||
/usr/src/app/.venv/bin/gunicorn src.api.main:app --worker-class uvicorn.workers.UvicornWorker
|
||||
else
|
||||
## pytest
|
||||
python -m pytest "src/tests" --junitxml=report.xml
|
||||
|
||||
## Coverage
|
||||
python -m pytest "src/tests" -p no:warnings --cov="src" --cov-report xml
|
||||
|
||||
|
||||
## Linting
|
||||
flake8 src --extend-ignore E221 --extend-ignore E501
|
||||
# black src --check
|
||||
# isort . --src-path src --check
|
||||
black src --check
|
||||
isort . --src-path src --check --profile black
|
||||
|
||||
## Security
|
||||
# bandit -c .bandit.yml -r .
|
||||
fi
|
||||
|
|
|
@ -4,20 +4,14 @@
|
|||
if [ "${TEST_TARGET:-}" = "INTEGRATION" ]; then
|
||||
/usr/src/app/.venv/bin/gunicorn src.api.main:app --worker-class uvicorn.workers.UvicornWorker --bind=0.0.0.0:5002
|
||||
else
|
||||
## pytest
|
||||
# python -m pytest "src/tests" --junitxml=report.xml
|
||||
touch report.xml
|
||||
|
||||
# ## Coverage
|
||||
# python -m pytest "src/tests" -p no:warnings --cov="src" --cov-report xml
|
||||
touch coverage.xml
|
||||
|
||||
|
||||
## Linting
|
||||
flake8 src --extend-ignore E221 --extend-ignore E501
|
||||
# black src --check
|
||||
# isort . --src-path src --check
|
||||
black src --check
|
||||
isort . --src-path src --check --profile black
|
||||
|
||||
## Security
|
||||
# bandit -c .bandit.yml -r .
|
||||
fi
|
||||
|
|
|
@ -1,22 +1,17 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
|
||||
if [ "${TEST_TARGET:-}" = "INTEGRATION" ]; then
|
||||
/usr/src/app/.venv/bin/gunicorn src.api.main:app --worker-class uvicorn.workers.UvicornWorker
|
||||
else
|
||||
## pytest
|
||||
# python -m pytest "src/tests" --junitxml=report.xml
|
||||
touch report.xml
|
||||
|
||||
## Coverage
|
||||
# python -m pytest "src/tests" -p no:warnings --cov="src" --cov-report xml
|
||||
touch coverage.xml
|
||||
|
||||
## Linting
|
||||
flake8 src --extend-ignore E221 --extend-ignore E501
|
||||
# black src --check
|
||||
# isort . --src-path src --check
|
||||
black src --check
|
||||
isort . --src-path src --check --profile black
|
||||
|
||||
## Security
|
||||
# bandit -c .bandit.yml -r .
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue