Skip to content

Commit e92bd19

Browse files
authored
Merge pull request #460 from Shopify/paulinakhew-add-codecov
Add codecov to measure code coverage across repo
2 parents b539359 + 232aefe commit e92bd19

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: CI
2-
3-
on:
4-
push:
5-
6-
2+
on: [push]
73
jobs:
84
build:
95
runs-on: ubuntu-latest
@@ -13,16 +9,23 @@ jobs:
139
version: [2.7, 3.6, 3.8]
1410

1511
steps:
16-
- uses: actions/checkout@v2
12+
- name: Checkout
13+
uses: actions/checkout@v2
1714
- name: Set up Python ${{ matrix.python-version }}
1815
uses: actions/setup-python@v2
1916
with:
2017
python-version: ${{ matrix.version }}
2118
- name: Install Dependencies
2219
run: |
2320
python -m pip install --upgrade pip
24-
pip install pytest mock
25-
python setup.py install
21+
pip install pytest mock pytest-cov
22+
python setup.py install
23+
pytest --cov=./ --cov-report=xml
2624
- name: Run Tests
2725
run: python -m pytest -v
28-
26+
- name: upload coverage to Codecov
27+
uses: codecov/codecov-action@v1
28+
with:
29+
token: ${{ secrets.CODECOV_TOKEN }}
30+
name: codecov-umbrella
31+
fail_ci_if_error: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Build Status](https://github.com/Shopify/shopify_python_api/workflows/CI/badge.svg)](https://github.com/Shopify/shopify_python_api/actions)
44
[![PyPI version](https://badge.fury.io/py/ShopifyAPI.svg)](https://badge.fury.io/py/ShopifyAPI)
5+
[![codecov](https://codecov.io/gh/Shopify/shopify_python_api/branch/master/graph/badge.svg?token=pNTx0TARUx)](https://codecov.io/gh/Shopify/shopify_python_api)
56

67
The [Shopify Admin API](https://shopify.dev/docs/admin-api) Python Library
78

0 commit comments

Comments
 (0)