Skip to content

Commit 4ea6045

Browse files
committed
Update envfile_testing Make command #520
Signed-off-by: Jono Yang <[email protected]>
1 parent ccb6e1c commit 4ea6045

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ envfile_testing:
5555
@if test -f ${ENV_FILE}; then echo ".env file exists already"; exit 1; fi
5656
@mkdir -p $(shell dirname ${ENV_FILE}) && touch ${ENV_FILE}
5757
@echo SECRET_KEY=\"${GET_SECRET_KEY}\" >> ${ENV_FILE}
58-
@echo SCANCODEIO_DB_PORT=\"5433\" >> ${ENV_FILE}
58+
@echo PACKAGEDB_DB_HOST=\"packagedb\" >> ${ENV_FILE}
5959

6060
isort:
6161
@echo "-> Apply isort changes to ensure proper imports ordering"
@@ -126,7 +126,7 @@ run_map:
126126

127127
test:
128128
@echo "-> Run the test suite"
129-
${ACTIVATE} DJANGO_SETTINGS_MODULE=purldb_project.settings ${PYTHON_EXE} -m pytest -vvs --ignore matchcode_pipeline --ignore matchcode_project --ignore purldb-toolkit --ignore packagedb/tests/test_throttling.py
129+
${ACTIVATE} DJANGO_SETTINGS_MODULE=purldb_project.settings ${PYTHON_EXE} -m pytest -x -vvs --ignore matchcode_pipeline --ignore matchcode_project --ignore purldb-toolkit --ignore packagedb/tests/test_throttling.py
130130
${ACTIVATE} DJANGO_SETTINGS_MODULE=purldb_project.settings ${PYTHON_EXE} -m pytest -vvs packagedb/tests/test_throttling.py
131131
${ACTIVATE} DJANGO_SETTINGS_MODULE=matchcode_project.settings ${PYTHON_EXE} -m pytest -vvs matchcode_pipeline
132132
${ACTIVATE} ${PYTHON_EXE} -m pytest -vvs purldb-toolkit/

azure-pipelines.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77

88
resources:
99
containers:
10-
- container: postgres
11-
image: postgres
10+
- container: packagedb
11+
image: postgres:13
1212
env:
13-
POSTGRES_DB: packagedb
14-
POSTGRES_USER: packagedb
15-
POSTGRES_PASSWORD: packagedb
16-
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8"
13+
POSTGRES_USER: 'packagedb'
14+
POSTGRES_PASSWORD: 'packagedb'
1715
ports:
1816
- 5432:5432
1917

etc/ci/azure-posix.yml

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818
test_suite_label: ${{ tsuite.key }}
1919
test_suite: ${{ tsuite.value }}
2020

21+
services:
22+
packagedb: packagedb
23+
2124
steps:
2225
- checkout: self
2326
fetchDepth: 10

0 commit comments

Comments
 (0)