This repository was archived by the owner on Dec 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (59 loc) · 2.09 KB
/
Copy pathtests.yml
File metadata and controls
75 lines (59 loc) · 2.09 KB
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
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
name: oeg.feature.class tests
on: [push]
jobs:
py2:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['2.7']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: flake8
run: |
flake8 --count --show-source --statistics --max-line-length=120 oeg_feature_class
flake8 --count --show-source --statistics --max-line-length=120 tests/test
- name: pylint
run: |
python -m pylint oeg_feature_class
python -m pylint tests/test
- name: pytest
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
pytest --cov=oeg_feature_class --cov-report xml --cov-report term:skip-covered --durations=5 tests
python-codacy-coverage -r coverage.xml
py3:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: flake8
run: |
flake8 --count --show-source --statistics --max-line-length=120 oeg_feature_class
flake8 --count --show-source --statistics --max-line-length=120 tests/test
- name: pylint
run: |
python -m pylint --init-hook="sys.path.insert(0, './')" oeg_feature_class
python -m pylint --init-hook="sys.path.insert(0, './')" tests/test
- name: pytest
run: |
pytest --cov=oeg_feature_class --cov-report xml --cov-report term:skip-covered --durations=5 tests