-
Notifications
You must be signed in to change notification settings - Fork 8
66 lines (63 loc) · 2.01 KB
/
main.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Tests
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [Ubuntu, MacOS, Windows]
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
- 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
codecov:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [Ubuntu]
python-version: [3.7]
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: Lint writing
uses: actionshub/markdownlint@main
- 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
pip install coverage
- name: Run test with pytest
run: |
pipenv run pytest tests --cov-config pytest.cov --cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1