Skip to content

Commit

Permalink
feat: Added test in circle ci, travis removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Suneet Srivastava committed Nov 25, 2020
1 parent 4f000cc commit adb4a87
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 42 deletions.
55 changes: 55 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,52 @@ jobs:
- ./.pytype
key: v1-pytype

test:
docker:
- image: circleci/python:3.7.4-node
environment:
APP_CONFIG: config.TestingConfig
SECRET_KEY: super secret key
PATH: $PATH:${HOME}/google-cloud-sdk/bin
DATABASE_URL: postgresql://test@localhost:5433/test
TEST_DATABASE_URL: postgresql://test@localhost:5433/test

- image: circleci/postgres:12-postgis-ram
environment:
POSTGRES_USER: postgres
POSTGRES_DB: test
POSTGRES_HOST_AUTH_METHOD: trust

- image: circleci/redis:5.0.6-alpine

working_directory: ~/code

steps:
- checkout

- run:
command: cat requirements/*.txt > requirements/combined.txt

# Download and cache dependencies
- restore_cache:
keys:
- v1.3-dependencies-{{ checksum "requirements/combined.txt" }}-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
l- v1.3-dependencies-

- run:
command: ./scripts/test_db.sh

- run:
command: pytest tests -v --cov=.

- run:
command: bash <(curl -s https://codecov.io/bash)
when: on_success
- run:
command: bash scripts/push_api_docs.sh


workflows:
version: 2
build-and-test:
Expand All @@ -119,3 +165,12 @@ workflows:
- pytype:
requires:
- dependencies
- test:
requires:
- dependencies
filters:
branches:
only:
- master
- development

42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

0 comments on commit adb4a87

Please sign in to comment.