Skip to content

Instantly share code, notes, and snippets.

@fabiogallotti
Last active May 5, 2020 12:06
version: 2.1
jobs:
test:
docker:
- image: <your_user_name>/tutorial_ci
steps:
- checkout
- run:
name: Setup Code Climate test-reporter
command: |
# download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- run:
name: Run tests
command: |
python -m pytest --cov-report xml --cov-report term --cov .
- run:
name: Send coverage to Code Climate
command: |
./cc-test-reporter after-build --exit-code $?
- run:
name: Send to codecov
command: |
bash <(curl -s https://codecov.io/bash) -Z
workflows:
test:
jobs:
- test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment