Skip to content

Commit

Permalink
Merge pull request #50 from JeppeKlitgaard/modern_python
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Apr 12, 2021
2 parents 75abcf9 + 1aa948f commit f26a196
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 55 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/ci.yml
@@ -1,17 +1,32 @@
on: [push, pull_request]

name: ci

jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd src; python -c 'import shellingham; print(shellingham.detect_shell())'
on:
- push
- pull_request

macos:
runs-on: macos-latest
jobs:
build:
runs-on: ${{ matrix.platform }}
continue-on-error: true
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, 3.10.0-alpha.7]

steps:
- uses: actions/checkout@v2
- run: cd src; python -c 'import shellingham; print(shellingham.detect_shell())'
- 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 pipenv tox tox-gh-actions
- name: Test with tox
run: tox
env:
PLATFORM: ${{ matrix.platform }}
8 changes: 7 additions & 1 deletion .gitignore
@@ -1,5 +1,4 @@
.env
.pytest_cache
.venv
__pycache__

Expand All @@ -9,3 +8,10 @@ dist
*.egg-info

*.py[co]

# Editors
.vscode

# Testing
.tox
.pytest_cache
2 changes: 2 additions & 0 deletions Pipfile
Expand Up @@ -8,6 +8,8 @@ pytest = '*'
pytest-mock = '*'
setl = '*'
towncrier = '*'
tox = '*'
tox-gh-actions = '*'

[scripts]
release = 'inv release'
109 changes: 75 additions & 34 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions setup.cfg
Expand Up @@ -16,20 +16,18 @@ classifier =
Intended Audience :: Developers
License :: OSI Approved :: ISC License (ISCL)
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Software Development :: Libraries :: Python Modules

[options]
package_dir =
= src
packages = find:
python_requires = >=2.6,!=3.0,!=3.1,!=3.2,!=3.3
python_requires = >=3.4
install_requires =
zip_safe = true

Expand Down
21 changes: 21 additions & 0 deletions tox.ini
@@ -0,0 +1,21 @@
[tox]
envlist = py37, py38, py39, py310

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310

[testenv]
allowlist_externals = pipenv
commands =
pipenv install --dev

[testenv:test]
deps =
pytest

commands =
pytest

0 comments on commit f26a196

Please sign in to comment.