Skip to content

Move from Travis CI to Github actions #5

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

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

env:
FORCE_COLOR: "1" # Make tools pretty.
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_NO_PYTHON_VERSION_WARNING: "1"

jobs:
build-package:
name: Build & verify package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v1

tests:
name: tox on ${{ matrix.python-version }}
needs: build-package
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'

steps:
- name: Download pre-built packages
uses: actions/download-artifact@v3
with:
name: Packages
path: dist
- run: tar xf dist/*.tar.gz --strip-components=1 # needed for config files

- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip

- name: Install dependencies
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade coverage[toml] tox tox-gh-actions

- name: Run tox targets for ${{ matrix.python-version }}
run: python -m tox
9 changes: 0 additions & 9 deletions MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def find_meta(meta):
maintainer_email=find_meta("email"),
keywords=KEYWORDS,
long_description=read("README.rst"),
long_description_content_type="text/x-rst",
packages=PACKAGES,
package_dir={"": "src"},
zip_safe=False,
Expand Down
13 changes: 7 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ commands =
python -m doctest README.rst


[testenv:manifest]
deps = check-manifest
skip_install = true
commands = check-manifest


[testenv:readme]
deps = readme_renderer
skip_install = true
Expand All @@ -49,3 +43,10 @@ commands =
coverage combine
coverage report


[gh-actions]
python =
3.6: py36
3.7: py37, docs
3.8: py38, lint, manifest
pypy3: pypy3