mirror of
https://github.com/matrix-org/synapse-s3-storage-provider.git
synced 2024-10-22 23:19:42 +00:00
Switch CI to GitHub Actions. (#53)
This commit is contained in:
parent
236e0cddb8
commit
c0bc3ce95a
3 changed files with 66 additions and 42 deletions
57
.github/workflows/ci.yml
vendored
Normal file
57
.github/workflows/ci.yml
vendored
Normal 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"
|
35
.travis.yml
35
.travis.yml
|
@ -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
16
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
|
||||
|
|
Loading…
Reference in a new issue