Skip to content

Commit 134f497

Browse files
authored
Migrate tests to GitHub actions
1 parent 12459e7 commit 134f497

File tree

5 files changed

+45
-29
lines changed

5 files changed

+45
-29
lines changed

.github/workflows/tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test Report Portal Python client
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install tox tox-gh-actions
21+
- name: Test with tox
22+
run: tox
23+
- name: Upload coverage to Codecov
24+
uses: codecov/codecov-action@v1
25+
with:
26+
files: coverage.xml
27+
flags: unittests
28+
name: codecov-client-reportportal
29+
path_to_write_report: codecov_report.txt
30+
python-version: 3.6
31+
verbose: true

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v2.5.0
5+
rev: v3.4.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
- id: check-added-large-files
1111
- repo: https://github.com/PyCQA/pydocstyle
12-
rev: 5.0.2
12+
rev: 6.0.0
1313
hooks:
1414
- id: pydocstyle
1515
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
16-
rev: v1.0.0
16+
rev: v1.0.1
1717
hooks:
1818
- id: rst-linter
1919
- repo: https://gitlab.com/pycqa/flake8.git
20-
rev: 3.7.7
20+
rev: 3.9.0
2121
hooks:
2222
- id: flake8

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![PyPI](https://img.shields.io/pypi/v/reportportal-client.svg?maxAge=259200)](https://pypi.python.org/pypi/reportportal-client)
44
[![Build Status](https://travis-ci.org/reportportal/client-Python.svg?branch=master)](https://travis-ci.org/reportportal/client-Python)
5+
[![codecov.io](https://codecov.io/gh/reportportal/client-Python/branch/master/graph/badge.svg)](https://codecov.io/gh/reportportal/client-Python)
56

67
Library used only for implementors of custom listeners for ReportPortal
78

tox.ini

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ envlist =
1111
[testenv]
1212
deps =
1313
pytest
14+
pytest-cov
1415
delayed-assert
1516
requests
16-
commands = python -m pytest tests/ -s -vv
17+
commands = pytest --cov=reportportal_client --cov-report=xml tests/ -s -vv
1718

1819
[testenv:pep]
1920
skip_install = True
@@ -24,13 +25,14 @@ commands = pre-commit run --all-files --show-diff-on-failure
2425
deps =
2526
mock
2627
pytest
28+
pytest-cov
2729
delayed-assert
2830
requests
2931

30-
[travis]
32+
[gh-actions]
3133
python =
32-
2.7: py27
33-
3.5: py35
34-
3.6: pep,py36
35-
3.7: py37
36-
3.8: py38
34+
2.7: py27
35+
3.5: py35
36+
3.6: pep, py36
37+
3.7: py37
38+
3.8: py38

0 commit comments

Comments
 (0)