Skip to content

Commit

Permalink
GitHub Actions CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Dec 22, 2020
1 parent 80e52e2 commit 73b2764
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
lint:
runs-on: ubuntu-20.04
env:
TOXENV: "lint, newsfragment"

steps:
- uses: actions/checkout@v2
with:
# Need history on all branches for newsfragment to work.
fetch-depth: 0

- uses: actions/setup-python@v2
with:
python-version: '3.8'

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key:
${{ runner.os }}-pip-lint-${{ hashFiles('pyproject.toml', 'setup.py', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-lint-
${{ runner.os }}-pip-
- run: python -m pip install tox

- run: tox -e flake8

- run: tox -e newsfragment

- run: tox -e twine

- run: tox -e check-manifest


docs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: "3.8"

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key:
${{ runner.os }}-pip-docs-${{ hashFiles('pyproject.toml', 'setup.py', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-docs-
${{ runner.os }}-pip-
- run: python -m pip install tox

- run: tox -e docs


test:
runs-on: ubuntu-20.04
env:
TOXENV: "alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push"
strategy:
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "pypy-2.7", "pypy-3.7"]

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key:
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'setup.py', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- run: python -m pip install tox

- name: Test
run: tox -q

0 comments on commit 73b2764

Please sign in to comment.