Skip to content

Commit 4cd84b5

Browse files
from travis to github actions
1 parent 9270876 commit 4cd84b5

File tree

2 files changed

+49
-37
lines changed

2 files changed

+49
-37
lines changed

Diff for: .github/workflow/python.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Python package
2+
3+
on: [ push ]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [ "3.4","3.5","3.6", "3.7", "3.8", "3.9" ]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v3
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install codecov
23+
pip install -r requirements.txt
24+
pip install -r test-requirements.txt
25+
26+
- name: Test with pytest
27+
run: |
28+
pytest --cov=./ --cov-report=xml
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v2
32+
with:
33+
directory: ./coverage/reports/
34+
env_vars: OS,PYTHON
35+
fail_ci_if_error: true
36+
files: ./coverage1.xml,./coverage2.xml
37+
flags: unittests
38+
name: codecov-umbrella
39+
path_to_write_report: ./coverage/codecov_report.txt
40+
verbose: true
41+
42+
- name: Build package
43+
run: python setup.py sdist
44+
45+
- name: Publish package
46+
uses: pypa/gh-action-pypi-publish@release/v1.5
47+
with:
48+
user: __token__
49+
password: ${{ secrets.PYPI_API_TOKEN }}

Diff for: .travis.yml

-37
This file was deleted.

0 commit comments

Comments
 (0)