diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1c74200 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5a13017..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/tox.ini b/tox.ini index ad5cc67..2734b0f 100644 --- a/tox.ini +++ b/tox.ini @@ -19,12 +19,8 @@ passenv = * commands = /usr/bin/find "{toxinidir}" -name '*.pyc' -delete - coverage run {env:COVERAGE_OPTS:} --include=s3_storage_provider.py \ - "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:test_s3} {env:TOXSUFFIX:} - {env:DUMP_COVERAGE_COMMAND:coverage report -m} - -[testenv:py27] -usedevelop=true + coverage run --include=s3_storage_provider.py -m twisted.trial test_s3 + coverage report -m [testenv:py35] usedevelop=true @@ -35,6 +31,12 @@ usedevelop=true [testenv:py37] usedevelop=true +[testenv:py38] +usedevelop=true + +[testenv:py39] +usedevelop=true + [testenv:packaging] deps = check-manifest @@ -50,7 +52,7 @@ deps = black==19.10b0 commands = 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] skip_install = True