.circleci/config.yml
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
- image: pandoc/latex:latest
working_directory: ~/app
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "setup.py" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dependencies
command: |
apk --no-cache add python3 py3-pip
pip install --upgrade pip
pip install .
- save_cache:
paths:
- ./data
key: v1-dependencies-{{ checksum "setup.py" }}
- run:
name: Setup Code Climate test-reporter
command: |
apk --no-cache add curl git
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- run:
name: run tests
command: |
./cc-test-reporter before-build
pip install coverage pytest pytest-cov
py.test --cov=typademic tests/
coverage html --directory=test-reports
coverage xml
./cc-test-reporter after-build
- store_artifacts:
path: test-reports
destination: test-reports
workflows:
version: 2
build-n-deploy:
jobs:
- build:
filters:
tags:
only: /.*/