Skip to content

Commit 69be326

Browse files
authored
Merge pull request #1431 from erikwrede/master
Add Codecov to github actions
2 parents efe4b89 + 2ee23b0 commit 69be326

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/tests.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
include:
2828
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
2929
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
30-
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
31-
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
32-
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
30+
- { name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38 }
31+
- { name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37 }
32+
- { name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36 }
3333
steps:
34-
- uses: actions/checkout@v2
35-
- uses: actions/setup-python@v2
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-python@v3
3636
with:
3737
python-version: ${{ matrix.python }}
3838

@@ -47,10 +47,20 @@ jobs:
4747
run: echo "::set-output name=dir::$(pip cache dir)"
4848

4949
- name: cache pip dependencies
50-
uses: actions/cache@v2
50+
uses: actions/cache@v3
5151
with:
5252
path: ${{ steps.pip-cache.outputs.dir }}
5353
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}
5454

5555
- run: pip install tox
5656
- run: tox -e ${{ matrix.tox }}
57+
- name: Upload coverage.xml
58+
if: ${{ matrix.python == '3.10' }}
59+
uses: actions/upload-artifact@v3
60+
with:
61+
name: graphene-sqlalchemy-coverage
62+
path: coverage.xml
63+
if-no-files-found: error
64+
- name: Upload coverage.xml to codecov
65+
if: ${{ matrix.python == '3.10' }}
66+
uses: codecov/codecov-action@v3

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ deps =
88
setenv =
99
PYTHONPATH = .:{envdir}
1010
commands =
11-
py{36,37,38,39,310}: pytest --cov=graphene graphene examples {posargs}
11+
py{36,37,38,39,310}: pytest --cov=graphene graphene --cov-report=term --cov-report=xml examples {posargs}
1212

1313
[testenv:pre-commit]
1414
basepython = python3.9

0 commit comments

Comments
 (0)