Skip to content

Commit acf1378

Browse files
Fokkokaxil
authored andcommitted
[AIRFLOW-2933] Enable Codecov on Docker-CI Build (#3780)
- Add missing variables and use codecov instead of coveralls. The issue why it wasn't working was because missing environment variables. The codecov library heavily depends on the environment variables in the CI to determine how to push the reports to codecov. - Remove the explicit passing of the variables in the `tox.ini` since it is already done in the `docker-compose.yml`, having to maintain this at two places makes it brittle. - Removed the empty Codecov yml since codecov was complaining that it was unable to parse it
1 parent f6191fb commit acf1378

File tree

4 files changed

+10
-37
lines changed

4 files changed

+10
-37
lines changed

.codecov.yml

-19
This file was deleted.

.travis.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,13 @@ cache:
4242
before_install:
4343
- sudo ls -lh $HOME/.cache/pip/
4444
- sudo rm -rf $HOME/.cache/pip/* $HOME/.wheelhouse/*
45-
- sudo chown -R travis.travis $HOME/.cache/pip
45+
- sudo chown -R travis:travis $HOME/.cache/pip
4646
install:
4747
# Use recent docker-compose version
4848
- sudo rm /usr/local/bin/docker-compose
4949
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
5050
- chmod +x docker-compose
5151
- sudo mv docker-compose /usr/local/bin
5252
- pip install --upgrade pip
53-
- pip install codecov
5453
script:
5554
- docker-compose --log-level ERROR -f scripts/ci/docker-compose.yml run airflow-testing /app/scripts/ci/run-ci.sh
56-
after_success:
57-
- sudo chown -R travis.travis .
58-
- codecov

scripts/ci/docker-compose.yml

+6
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,17 @@ services:
7070
- SLUGIFY_USES_TEXT_UNIDECODE=yes
7171
- TOX_ENV
7272
- PYTHON_VERSION
73+
- CI
7374
- TRAVIS
7475
- TRAVIS_BRANCH
7576
- TRAVIS_BUILD_DIR
7677
- TRAVIS_JOB_ID
78+
- TRAVIS_JOB_NUMBER
7779
- TRAVIS_PULL_REQUEST
80+
- TRAVIS_COMMIT
81+
- TRAVIS_REPO_SLUG
82+
- TRAVIS_OS_NAME
83+
- TRAVIS_TAG
7884
depends_on:
7985
- postgres
8086
- mysql

tox.ini

+3-13
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ignore = E731,W503
3333
[testenv]
3434
deps =
3535
wheel
36-
coveralls
36+
codecov
3737

3838
basepython =
3939
py27: python2.7
@@ -52,18 +52,7 @@ setenv =
5252
backend_sqlite: AIRFLOW__CORE__SQL_ALCHEMY_CONN=sqlite:///{homedir}/airflow.db
5353
backend_sqlite: AIRFLOW__CORE__EXECUTOR=SequentialExecutor
5454

55-
passenv =
56-
HOME
57-
JAVA_HOME
58-
USER
59-
PATH
60-
BOTO_CONFIG
61-
TRAVIS
62-
TRAVIS_BRANCH
63-
TRAVIS_BUILD_DIR
64-
TRAVIS_JOB_ID
65-
TRAVIS_PULL_REQUEST
66-
SLUGIFY_USES_TEXT_UNIDECODE
55+
passenv = *
6756

6857
commands =
6958
pip wheel --progress-bar off -w {homedir}/.wheelhouse -f {homedir}/.wheelhouse -e .[devel_ci]
@@ -74,6 +63,7 @@ commands =
7463
{toxinidir}/scripts/ci/4-load-data.sh
7564
{toxinidir}/scripts/ci/5-run-tests.sh []
7665
{toxinidir}/scripts/ci/6-check-license.sh
66+
codecov -e TOXENV
7767

7868
[testenv:flake8]
7969
basepython = python3

0 commit comments

Comments
 (0)