Switch CI to GitHub Actions. (#53)

This commit is contained in:
Patrick Cloke 2021-02-17 11:22:05 -05:00 committed by GitHub
parent 236e0cddb8
commit c0bc3ce95a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 42 deletions

57
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,57 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
lint:
name: "Lint & Packaging"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-python@v2"
with:
python-version: "3.6"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
- name: "Run tox lint targets for ${{ matrix.python-version }}"
run: "python -m tox -e check_isort,pep8,packaging"
tests:
needs: lint
name: "Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox -e py"

View file

@ -1,35 +0,0 @@
sudo: false
language: python
# tell travis to cache ~/.cache/pip
cache: pip
matrix:
fast_finish: true
include:
- python: 3.6
env: TOX_ENV=pep8
- python: 3.6
env: TOX_ENV=packaging
- python: 3.5
env: TOX_ENV=py35
- python: 3.6
env: TOX_ENV=py36
- python: 3.7
language: python
sudo: required
dist: xenial
env: TOX_ENV=py37
- python: 3.6
env: TOX_ENV=check_isort
install:
- pip install tox
script:
- tox -e $TOX_ENV

16
tox.ini
View file

@ -19,12 +19,8 @@ passenv = *
commands = commands =
/usr/bin/find "{toxinidir}" -name '*.pyc' -delete /usr/bin/find "{toxinidir}" -name '*.pyc' -delete
coverage run {env:COVERAGE_OPTS:} --include=s3_storage_provider.py \ coverage run --include=s3_storage_provider.py -m twisted.trial test_s3
"{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:test_s3} {env:TOXSUFFIX:} coverage report -m
{env:DUMP_COVERAGE_COMMAND:coverage report -m}
[testenv:py27]
usedevelop=true
[testenv:py35] [testenv:py35]
usedevelop=true usedevelop=true
@ -35,6 +31,12 @@ usedevelop=true
[testenv:py37] [testenv:py37]
usedevelop=true usedevelop=true
[testenv:py38]
usedevelop=true
[testenv:py39]
usedevelop=true
[testenv:packaging] [testenv:packaging]
deps = deps =
check-manifest check-manifest
@ -50,7 +52,7 @@ deps =
black==19.10b0 black==19.10b0
commands = commands =
python -m black --check --diff . python -m black --check --diff .
/bin/sh -c "flake8 s3_storage_provider.py setup.py {env:PEP8SUFFIX:}" /bin/sh -c "flake8 s3_storage_provider.py setup.py"
[testenv:check_isort] [testenv:check_isort]
skip_install = True skip_install = True