Skip to content

Commit 8a78dad

Browse files
authored
Merge pull request #582 from cclauss/tox-github-action
Use GitHub Actions instead of Travis CI
2 parents a90d65b + 5666d66 commit 8a78dad

File tree

3 files changed

+45
-21
lines changed

3 files changed

+45
-21
lines changed

.github/workflows/lint-python.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: lint_python
2+
on: [pull_request, push]
3+
jobs:
4+
lint_python:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/setup-python@v2
9+
- run: pip install bandit black codespell flake8 isort mypy pytest pyupgrade safety
10+
- run: bandit --recursive --skip B101,B105,B106,B110,B303,B404,B603 .
11+
- run: black --check . || true
12+
- run: codespell || true # --ignore-words-list="" --skip=""
13+
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
14+
- run: flake8 . --count --exit-zero --max-complexity=29 --max-line-length=167 --show-source --statistics
15+
- run: isort --check-only --profile black . || true
16+
- run: pip install -e .
17+
- run: mypy --ignore-missing-imports . || true
18+
- run: mv setup.cfg setup.cfg.disabled
19+
- run: pytest .
20+
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
21+
- run: safety check

.github/workflows/tox.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: tox
2+
on: [push, pull_request]
3+
jobs:
4+
tox:
5+
strategy:
6+
fail-fast: false
7+
max-parallel: 4
8+
matrix:
9+
python: [3.6, 3.7, 3.8, 3.9]
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-python@v2
14+
with:
15+
python-version: ${{ matrix.python }}
16+
- run: pip install tox
17+
- if: matrix.python == '3.6'
18+
run: TOXENV=py36 tox
19+
- if: matrix.python == '3.7'
20+
run: TOXENV=py37 tox
21+
- if: matrix.python == '3.8'
22+
run: TOXENV=py38 tox
23+
- if: matrix.python == '3.9'
24+
run: TOXENV=py39 tox

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)