Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern python #50

Merged
merged 3 commits into from Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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