-
Notifications
You must be signed in to change notification settings - Fork 60
91 lines (85 loc) · 2.63 KB
/
pytest.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# This workflow will install Python dependencies and run tests with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Pytest
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test-py35:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.5
uses: actions/setup-python@v2
with:
python-version: "3.5.4"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 setup.py install
- name: Test with pytest
run: |
pytest --cov-config=.coveragerc --cov-report xml:coverage.xml --cov=translatepy -vvs tests/
- name: Upload Coverage report
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
test-py37:
runs-on: ubuntu-20.04
needs: test-py35
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.7.1"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 setup.py install
- name: Test with pytest
run: |
pytest -vvs
test-py39:
runs-on: ubuntu-20.04
needs: test-py37
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 setup.py install
- name: Test with pytest
run: |
pytest -vvs
test-py310:
runs-on: ubuntu-20.04
needs: test-py39
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 setup.py install
- name: Test with pytest
run: |
pytest -vvs tests/