Skip to content

first shot at adding ~coveralls~ codecov integration #187

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

Merged
merged 11 commits into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,13 @@ jobs:
- name: Run Python unit tests (Ubuntu ${{ matrix.UbuntuVersion }})
timeout-minutes: 30
run: docker exec mlos-build-python-${{ matrix.UbuntuVersion }} make python-test
- name: Upload coverage to codecov
if: ${{ github.repository == 'microsoft/mlos' }}
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true
- name: Cleanup docker instance for Ubuntu ${{ matrix.UbuntuVersion }}
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ RUN python3.7 -m pip install pip && \

COPY ./source/Mlos.Python/requirements.txt /tmp/
RUN python3.7 -m pip install -r /tmp/requirements.txt
RUN python3.7 -m pip install pytest-cov

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or do we need pip install pytest-cov?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

# Expose the typical port that we start mlos microservice optimizer on by default.
EXPOSE 50051/tcp
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![codecov](https://codecov.io/gh/microsoft/MLOS/branch/main/graph/badge.svg?token=14T6RFL2KR)](https://codecov.io/gh/microsoft/MLOS)

# MLOS: Machine Learning Optimized Systems

## MLOS: An Infrastructure for Automated Software Performance Engineering
Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: false
2 changes: 1 addition & 1 deletion scripts/run-python-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ set -eu
scriptdir=$(readlink -f "$(dirname "$0")")
cd "$scriptdir/.."

pytest -svxl source/Mlos.Python $*
pytest -svxl source/Mlos.Python --cov=mlos --cov-report=xml $*