Report code coverage for ingestion-edge

Closes #123
This commit is contained in:
Jeff Klukas 2018-11-06 14:26:58 -05:00
Родитель 5599c5be97
Коммит bd7c122e68
4 изменённых файлов: 24 добавлений и 3 удалений

Просмотреть файл

@ -47,6 +47,9 @@ jobs:
"$CIRCLE_PROJECT_REPONAME"
"$CIRCLE_BUILD_URL"
> ingestion-edge/version.json
- run:
name: Persist CI environment file for passing into docker containers
command: env | grep '^CI' > ingestion-edge/circleci.env
- run:
name: Docker Compose Test
command: >-
@ -57,7 +60,7 @@ jobs:
--force-recreate
--quiet-pull
environment:
COMPOSE_FILE: ingestion-edge/docker-compose.yml
COMPOSE_FILE: ingestion-edge/docker-compose.yml:ingestion-edge/docker-compose.circleci.yml
COMPOSE_PROJECT_NAME: circleci-ingestion-edge
- run:
name: Early return for no deploy
@ -95,7 +98,7 @@ jobs:
command: cd ingestion-beam && mvn clean test
- run:
name: Report code coverage
command: bash <(curl -s https://codecov.io/bash) -F beam
command: bash <(curl -s https://codecov.io/bash) -F ingestion_beam
- save_cache:
paths:
- ~/.m2

Просмотреть файл

@ -0,0 +1,9 @@
# This file is not in the default docker-compose path, so will be ignored
# unless passed explicitly to docker-compose as we do in our CI configuration.
version: '3'
services:
test:
entrypoint: docker/pytest-upload-coverage
env_file:
- circleci.env

Просмотреть файл

@ -38,12 +38,13 @@ services:
]
test:
image: *image
entrypoint: py.test
entrypoint: pytest
command:
- --flake8
- --docstyle
- --mypy
- --mypy-ignore-missing-imports
- --cov=./
depends_on:
- pubsub
- web

Просмотреть файл

@ -0,0 +1,8 @@
#!/bin/bash
# Wrapper for pytest that also submits coverage data.
set -eox pipefail
pytest "$@"
bash <(curl -s https://codecov.io/bash) -F ingestion_edge