-
Notifications
You must be signed in to change notification settings - Fork 8
37 lines (35 loc) · 1.09 KB
/
test.yml
File metadata and controls
37 lines (35 loc) · 1.09 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
name: Tests
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [Ubuntu, MacOS]
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Setup Pipenv
uses: dschep/install-pipenv-action@v1
- name: Install dependencies
run: |
# install dependencies according to the lock file
pipenv install --dev --ignore-pipfile --python ${{ steps.setup-python.outputs.python-version }}
pipenv run python -m spacy download en_core_web_sm
- name: Run test with pytest
run: |
pipenv run pytest tests --cov-config pytest.cov --cov
- name: Lint with flake8
run: |
pipenv run flake8 src
pipenv run flake8 tests
- name: Lint with pylint
run: |
pipenv run pylint src
pipenv run pylint tests