forked from linkedin/detext
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.15 KB
/
python-app-py3.yml
File metadata and controls
39 lines (34 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python 3 application
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
python-version: [3.6, 3.7]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
python setup.py develop
- name: Lint with flake8
run: |
pip install -U flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --ignore=E121,E123,E226,W292,E402 --max-line-length=160 --exclude=src/detext/model/bert/*.py --show-source --statistics
- name: Test with pytest
run: |
pip install pytest
pytest