8000 Add RTDB-emulator-based integration testing. · ClarkDing/firebase-admin-python@74e06d2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 74e06d2

Browse files
committed
Add RTDB-emulator-based integration testing.
1 parent 77a8e14 commit 74e06d2

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.travis.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,23 @@ python:
55
- "3.5"
66
- "3.6"
77
- "pypy3.5"
8-
# command to install dependencies
9-
install: "pip install -r requirements.txt"
10-
before_script:
11-
- export PY_VERSION=`python -c 'import sys; print sys.version_info.major'`
12-
- if [[ "$PY_VERSION" == '2' ]]; then ./lint.sh all; fi
13-
# command to run tests
14-
script: pytest
8+
env:
9+
- TEST_TYPE=unit
10+
- TEST_TYPE=integration
11+
12+
jobs:
13+
include:
14+
- name: "Lint"
15+
python: "2.7"
16+
script: ./lint.sh all
17+
18+
before_install:
19+
- if [[ "$TEST_TYPE" == "integration" ]]; then nvm install 8 && npm install -g firebase-tools; fi
20+
script:
21+
- if [[ "$TEST_TYPE" == "unit" ]]; then pytest; fi
22+
- if [[ "$TEST_TYPE" == "integration" ]]; then firebase emulators:exec --only database --project fake-project-id 'pytest integration/test_db.py'; fi
23+
cache:
24+
pip: true
25+
npm: true
26+
directories:
27+
- $HOME/.cache/firebase/emulators

0 commit comments

Comments
 (0)
0