Skip to content

Commit

Permalink
Add GitHub actions to replace Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
theskumar authored and bbc2 committed Feb 21, 2021
1 parent ac670cf commit a7fe93f
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 60 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,25 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
make release
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,25 @@
name: Run Tests

on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 8
matrix:
os:
- ubuntu-latest
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
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 tox tox-gh-actions
- name: Test with tox
run: tox
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion setup.cfg
Expand Up @@ -17,12 +17,13 @@ exclude = .tox,.git,docs,venv,.venv
ignore_missing_imports = true

[metadata]
description-file = README.rst
description-file = README.md

[tool:pytest]
testpaths = tests

[coverage:run]
relative_files = True
source = dotenv

[coverage:paths]
Expand All @@ -33,6 +34,7 @@ source =

[coverage:report]
show_missing = True
include = */site-packages/dotenv/*
exclude_lines =
if IS_TYPE_CHECKING:
pragma: no cover
19 changes: 12 additions & 7 deletions tox.ini
@@ -1,5 +1,16 @@
[tox]
envlist = lint,py{27,34,35,36,37,38,39,34-no-typing},pypy,pypy3,manifest,coverage-report
envlist = lint,py{27,35,36,37,38,39},pypy,pypy3,manifest,coverage-report

[gh-actions]
python =
2.7: py27, coverage-report
3.5: py35, coverage-report
3.6: py36, coverage-report
3.7: py37, coverage-report
3.8: py38, coverage-report
3.9: py39, mypy, lint, manifest, coverage-report
pypy2: pypy, coverage-report
pypy3: pypy3, coverage-report

[testenv]
deps =
Expand All @@ -9,15 +20,9 @@ deps =
sh
click
py{27,py}: ipython<6.0.0
py34{,-no-typing}: ipython<7.0.0
py{35,36,37,38,39,py3}: ipython
commands = coverage run --parallel -m pytest {posargs}

[testenv:py34-no-typing]
commands =
pip uninstall --yes typing
coverage run --parallel -m pytest -k 'not test_ipython' {posargs}

[testenv:lint]
skip_install = true
deps =
Expand Down

0 comments on commit a7fe93f

Please sign in to comment.