forked from AFPy/potodo
Replaced travis with GH Actions
This commit is contained in:
parent
a09cc0e115
commit
4e8cd269f7
30
.github/workflows/tests.yml
vendored
Normal file
30
.github/workflows/tests.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Tox tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*.*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*.*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 5
|
||||
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
|
||||
pip install tox tox-gh-actions
|
||||
- name: Test with tox
|
||||
run: tox
|
29
.travis.yml
29
.travis.yml
|
@ -1,29 +0,0 @@
|
|||
language: python
|
||||
cache:
|
||||
directories:
|
||||
- .tox/
|
||||
- $HOME/.cache/pip
|
||||
matrix:
|
||||
include:
|
||||
- python: "3.6"
|
||||
env: TOX_ENV=py36
|
||||
name: 3.6 tests
|
||||
- python: "3.7"
|
||||
env: TOX_ENV=py37
|
||||
name: 3.7 tests
|
||||
- python: "3.8"
|
||||
env: TOX_ENV=py38
|
||||
name: 3.8 tests
|
||||
# 3.9 is commented as travis doesn't have it as of October 2020
|
||||
# - python: "3.9"
|
||||
# env: TOX_ENV=py39
|
||||
# name: 3.9 tests
|
||||
- python: "3.8"
|
||||
env: TOX_ENV=black,flake8,mypy
|
||||
name: Linting
|
||||
|
||||
install:
|
||||
- pip uninstall -y virtualenv
|
||||
- pip install tox
|
||||
script:
|
||||
- tox -r -e $TOX_ENV
|
7
tox.ini
7
tox.ini
|
@ -5,6 +5,13 @@ extend-ignore = E501 # line length handled by black.
|
|||
envlist = py36, py37, py38, py39, flake8, mypy, black
|
||||
skip_missing_interpreters = True
|
||||
|
||||
[gh-actions]
|
||||
python =
|
||||
3.6: py36
|
||||
3.7: py37
|
||||
3.8: py38, mypy, flake8, black
|
||||
3.9: py39, mypy, flake8, black
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
pytest
|
||||
|
|
Loading…
Reference in New Issue
Block a user