Gh action tox (#1536)

* tox via gh-action
This commit is contained in:
Michel Oosterhof 2021-04-16 21:47:12 +08:00 committed by GitHub
parent db51e6a79a
commit 628ad9bed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 7 deletions

View File

@ -53,10 +53,10 @@ jobs:
. cowrie-env/bin/activate
pytype src || true
- run:
name: PyType
name: Pyre
command: |
. cowrie-env/bin/activate
pyre analyze || true
pyre --noninteractive analyze || true
- run:
name: Build Python library
command: |

26
.github/workflows/tox.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Tox
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
pip install tox-gh-actions
- name: Test with tox
run: tox

View File

@ -1,5 +1,9 @@
{
"source_directories": [
"src"
]
],
"exclude": [
".*/src/cowrie/output/.*"
],
"workers": 4
}

View File

@ -23,7 +23,7 @@ before_script:
- mypy src
- twistedchecker src || true
- pytype || true
- pyre analyze || true
- pyre --noninteractive analyze || true
- python setup.py build sdist bdist
- make -C docs html
script:

12
tox.ini
View File

@ -4,12 +4,18 @@ envlist = lint,docs,py36,py37,py38,py39,py310,mypy,pytype,pyre
deps = -r{toxinidir}/requirements.txt
skip_missing_interpreters=True
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38, lint, docs, mypy, pytype, pyre
3.9: py39
[travis]
python =
3.6: py36
3.7: py37
3.8: py38, lint, docs
3.8: py38, lint, docs, mypy, pytype, pyre
3.9: py39
3.10: py310
pypy: pypy
@ -66,7 +72,7 @@ deps =
-r{toxinidir}/requirements-dev.txt
commands =
pytype
- pytype
[testenv:pyre]
description = run Pyre (static type checker)
@ -76,4 +82,4 @@ deps =
-r{toxinidir}/requirements-dev.txt
commands =
pyre analyze
- pyre --noninteractive analyze