mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
add gitlab actions config
This commit is contained in:
parent
30fdf17902
commit
8b535473ce
28
.github/workflows/python.yml
vendored
Normal file
28
.github/workflows/python.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
name: Python Library
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.5", "3.6", "3.7", "3.8"]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Set up env
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install tox
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
tox -e flake
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
# use "py", which is the default python version
|
||||
tox -e py
|
6
tox.ini
6
tox.ini
|
@ -18,5 +18,7 @@ deps =
|
|||
-rdev-requirements.txt
|
||||
flake8
|
||||
commands =
|
||||
# TODO: move options to dedicated flake8 config
|
||||
flake8 --exclude telethon/tl/,telethon/errors/rpcerrorlist.py --ignore E501,F401 telethon/ tests/
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --exclude telethon/tl/,telethon/errors/rpcerrorlist.py --max-complexity=10 --max-line-length=127 --statistics
|
||||
|
|
Loading…
Reference in New Issue
Block a user