-
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.
adjusted metadata expose source ids env var env var azure-pipelines pipeline denise db? postgres
- Loading branch information
1 parent
1700bd2
commit e1b449e
Showing
4 changed files
with
98 additions
and
27 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,71 @@ | ||
trigger: | ||
- feature/azure-pipelines | ||
|
||
pool: | ||
vmImage: 'Ubuntu-18.04' | ||
|
||
variables: | ||
# imageName: 'unicef/donor-reporting-portal-backend' | ||
imageName: 'scs-drp-be' | ||
dockerHub: 'uniwebsscsdrpdev' | ||
DATABASE_URL: 'psql://postgres:pass@postgres:5432/donor_reporting_portal' | ||
HOST: 'http://localhost:8082' | ||
SECRET_KEY: 'top-secret' | ||
INSIGHT_URL: 'https://uniapis.unicef.org/biapi/v1/' | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: pass | ||
POSTGRES_DB: donor_reporting_portal | ||
|
||
container: | ||
image: postgres:12-alpine | ||
# options: --hostname container-test --ip 192.168.0.1 | ||
ports: | ||
- 8080:80 | ||
- 5432 | ||
|
||
strategy: | ||
matrix: | ||
Python38: | ||
python.version: '3.8' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
|
||
- script: | | ||
env | ||
apt install -y postgresql-client | ||
psql --host=postgres --username=postgres --command="SELECT 1;" | ||
python --version | ||
python -m pip install --upgrade pip | ||
pip install tox pipenv | ||
displayName: 'Install dependencies' | ||
|
||
- script: | | ||
tox --version | ||
tox | ||
displayName: 'Run tests' | ||
|
||
#- task: PublishTestResults@2 | ||
# inputs: | ||
# testResultsFiles: 'tests/report.xml' | ||
# testRunTitle: '$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)' | ||
# condition: succeededOrFailed() | ||
|
||
#- task: Docker@2 | ||
# displayName: Build an image | ||
# inputs: | ||
# repository: $(imageName) | ||
# command: build | ||
# Dockerfile: docker/Dockerfile | ||
# buildContext: . | ||
|
||
#- task: Docker@2 | ||
# displayName: Push image | ||
# inputs: | ||
# containerRegistry: | | ||
# $(dockerHub) | ||
# repository: $(imageName) | ||
# command: push | ||
# tags: | | ||
# $(Build.BuildId) | ||
# latest |
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,23 @@ | ||
[pytest] | ||
norecursedirs = data .tox | ||
python_paths = ./tests/_test_lib ./src/ | ||
DJANGO_SETTINGS_MODULE = donor_reporting_portal.config.settings | ||
django_find_project = false | ||
addopts = | ||
-v | ||
--reuse-db | ||
--tb=short | ||
--maxfail=20 | ||
--echo-version=donor_reporting_portal | ||
--echo-version=django | ||
--echo-env=CIRCLECI | ||
--echo-env=PIPENV_VERBOSITY | ||
--capture=no | ||
--cov-report=html | ||
--cov-config=tests/.coveragerc | ||
--cov=donor_reporting_portal | ||
|
||
markers = | ||
slow: marks tests as slow (deselect with '-m "not slow"') | ||
|
||
pep8ignore = * ALL |
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