forked from python/bedevere
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.12 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Tests
on:
pull_request:
push:
branches: master
jobs:
test:
name: test w/ Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.9-dev"]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/setup-python@v2
if: "!endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}
- uses: deadsnakes/action@v2.1.1
if: endsWith(matrix.python-version, '-dev')
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: python3 -m pip install coverage -U pip -r dev-requirements.txt
- name: Run Tests
run: pytest --cov=tests/ --cov-report=xml
- uses: codecov/codecov-action@v1
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml