-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from ithaka/github-actions
Move from Travis CI to GitHub Actions
- Loading branch information
Showing
7 changed files
with
134 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: Checks | ||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install tox | ||
run: python -m pip install tox | ||
|
||
- name: Run linting | ||
run: tox -e lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: | ||
- version: '3.10-dev' | ||
toxenv: 'py310' | ||
- version: '3.9' | ||
toxenv: 'py39' | ||
- version: '3.8' | ||
toxenv: 'py38' | ||
- version: '3.7' | ||
toxenv: 'py38' | ||
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 tox | ||
run: python -m pip install tox | ||
|
||
- name: Run checks | ||
run: tox -e ${{ matrix.python.toxenv }} | ||
|
||
typecheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install tox | ||
run: python -m pip install tox | ||
|
||
- name: Run type checks | ||
run: tox -e typecheck | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install tox | ||
run: python -m pip install tox | ||
|
||
- name: Build docs | ||
run: tox -e docs | ||
|
||
publish: | ||
needs: [lint, test, typecheck, docs] | ||
if: startsWith(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install pypa/build | ||
run: python -m pip install build | ||
|
||
- name: Build distribution | ||
run: python -m build --sdist --wheel --outdir dist/ | ||
|
||
- name: Publish distribution to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
- name: Publish distribution to GitHub release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
dist/apiron-*.whl | ||
dist/apiron-*.tar.gz | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ['py37', 'py38'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = apiron | ||
version = 6.0.0 | ||
version = 6.0.0-post.1 | ||
description = apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP. | ||
author = Ithaka Harbors, Inc. | ||
author_email = [email protected] | ||
|
@@ -22,6 +22,7 @@ classifiers = | |
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
License :: OSI Approved :: MIT License | ||
|
@@ -66,7 +67,8 @@ addopts = -ra --strict-markers --cov | |
xfail_strict = True | ||
[tox:tox] | ||
envlist = py37,py38,py39 | ||
envlist = py37,py38,py39,py310 | ||
isolated_build = True | ||
[testenv] | ||
deps = | ||
|
@@ -83,6 +85,7 @@ commands = | |
sphinx-build -b html docs {envtmpdir}/docs | ||
[testenv:lint] | ||
skip_install = True | ||
deps = | ||
black | ||
pyflakes | ||
|