Skip to content

Commit a7fe93f

Browse files
theskumarbbc2
authored andcommitted
Add GitHub actions to replace Travis CI
1 parent ac670cf commit a7fe93f

File tree

5 files changed

+65
-60
lines changed

5 files changed

+65
-60
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
make release

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Run Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
max-parallel: 8
10+
matrix:
11+
os:
12+
- ubuntu-latest
13+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install tox tox-gh-actions
24+
- name: Test with tox
25+
run: tox

.travis.yml

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

setup.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ exclude = .tox,.git,docs,venv,.venv
1717
ignore_missing_imports = true
1818

1919
[metadata]
20-
description-file = README.rst
20+
description-file = README.md
2121

2222
[tool:pytest]
2323
testpaths = tests
2424

2525
[coverage:run]
26+
relative_files = True
2627
source = dotenv
2728

2829
[coverage:paths]
@@ -33,6 +34,7 @@ source =
3334

3435
[coverage:report]
3536
show_missing = True
37+
include = */site-packages/dotenv/*
3638
exclude_lines =
3739
if IS_TYPE_CHECKING:
3840
pragma: no cover

tox.ini

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
[tox]
2-
envlist = lint,py{27,34,35,36,37,38,39,34-no-typing},pypy,pypy3,manifest,coverage-report
2+
envlist = lint,py{27,35,36,37,38,39},pypy,pypy3,manifest,coverage-report
3+
4+
[gh-actions]
5+
python =
6+
2.7: py27, coverage-report
7+
3.5: py35, coverage-report
8+
3.6: py36, coverage-report
9+
3.7: py37, coverage-report
10+
3.8: py38, coverage-report
11+
3.9: py39, mypy, lint, manifest, coverage-report
12+
pypy2: pypy, coverage-report
13+
pypy3: pypy3, coverage-report
314

415
[testenv]
516
deps =
@@ -9,15 +20,9 @@ deps =
920
sh
1021
click
1122
py{27,py}: ipython<6.0.0
12-
py34{,-no-typing}: ipython<7.0.0
1323
py{35,36,37,38,39,py3}: ipython
1424
commands = coverage run --parallel -m pytest {posargs}
1525

16-
[testenv:py34-no-typing]
17-
commands =
18-
pip uninstall --yes typing
19-
coverage run --parallel -m pytest -k 'not test_ipython' {posargs}
20-
2126
[testenv:lint]
2227
skip_install = true
2328
deps =

0 commit comments

Comments
 (0)