Skip to content

Commit abeb343

Browse files
codedsunSuneet Srivastavaiamareebjamal
authored
chore: Change tests to circle CI (#7463)
Co-authored-by: Suneet Srivastava <[email protected]> Co-authored-by: Areeb Jamal <[email protected]>
1 parent 8a49010 commit abeb343

File tree

2 files changed

+52
-42
lines changed

2 files changed

+52
-42
lines changed

.circleci/config.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,55 @@ jobs:
108108
- ./.pytype
109109
key: v1-pytype
110110

111+
test:
112+
docker:
113+
- image: circleci/python:3.7.4-node
114+
environment:
115+
APP_CONFIG: config.TestingConfig
116+
DATABASE_URL: postgresql://postgres@localhost/test
117+
TEST_DATABASE_URL: postgresql://postgres@localhost/test
118+
SECRET_KEY: super secret key
119+
# Services
120+
- image: circleci/postgres:12-postgis-ram
121+
environment:
122+
POSTGRES_USER: postgres
123+
POSTGRES_DB: test
124+
POSTGRES_HOST_AUTH_METHOD: trust
125+
- image: circleci/redis:5.0.6-alpine
126+
127+
working_directory: ~/code
128+
129+
steps:
130+
- checkout
131+
132+
- run:
133+
command: cat requirements/*.txt > requirements/combined.txt
134+
135+
# Download and cache dependencies
136+
- restore_cache:
137+
keys:
138+
- v1.3-dependencies-{{ checksum "requirements/combined.txt" }}-{{ checksum "package.json" }}
139+
# fallback to using the latest cache if no exact match is found
140+
- v1.3-dependencies-
141+
142+
- run:
143+
name: Test
144+
command: |
145+
. venv/bin/activate
146+
mkdir test-results
147+
pytest tests -v --junitxml=test-results/junit.xml --cov=.
148+
149+
- store_test_results:
150+
path: test-results
151+
152+
- store_artifacts:
153+
path: test-results
154+
155+
- run:
156+
name: Upload Coverage
157+
command: . venv/bin/activate && bash <(curl -s https://codecov.io/bash)
158+
when: on_success
159+
111160
workflows:
112161
version: 2
113162
build-and-test:
@@ -119,3 +168,6 @@ workflows:
119168
- pytype:
120169
requires:
121170
- dependencies
171+
- test:
172+
requires:
173+
- dependencies

.travis.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)