Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Change tests to circle CI #7463

Merged
merged 11 commits into from
Nov 25, 2020
Merged
52 changes: 52 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,55 @@ jobs:
- ./.pytype
key: v1-pytype

test:
docker:
- image: circleci/python:3.7.4-node
environment:
APP_CONFIG: config.TestingConfig
DATABASE_URL: postgresql://postgres@localhost/test
TEST_DATABASE_URL: postgresql://postgres@localhost/test
iamareebjamal marked this conversation as resolved.
Show resolved Hide resolved
SECRET_KEY: super secret key
# Services
- 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
- v1.3-dependencies-

- run:
name: Test
command: |
. venv/bin/activate
mkdir test-results
pytest tests -v --junitxml=test-results/junit.xml --cov=.

- store_test_results:
path: test-results

- store_artifacts:
path: test-results

- run:
name: Upload Coverage
command: . venv/bin/activate && bash <(curl -s https://codecov.io/bash)
when: on_success

workflows:
version: 2
build-and-test:
Expand All @@ -119,3 +168,6 @@ workflows:
- pytype:
requires:
- dependencies
- test:
requires:
- dependencies
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.