Skip to content

Commit 7ab4082

Browse files
authored
Create pytest.yml
1 parent a716214 commit 7ab4082

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/pytest.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Pytest
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: [3.7, 3.8, 3.9, 3.10.0-beta.3]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
python setup.py sdist
24+
python setup.py install
25+
python -m pip install pytest pytest-cov pytest-xdist requests coveralls codacy-coverage
26+
pip install --ignore-installed pytest>=4.4.0
27+
pytest --version
28+
- name: Test with pytest
29+
run: |
30+
python setup.py test -a '--cov-config .coveragerc --cov=json_to_models -m "not no_expected" test/'
31+
- name: Coverage
32+
run: |
33+
coverage xml
34+
coveralls
35+
python-codacy-coverage -r coverage.xml
36+

0 commit comments

Comments
 (0)