-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.26 KB
/
spoc-app.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
# 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: SPOC application CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Download spaCy English Medium
run: python -m spacy download en_core_web_md
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
# See https://flake8.pycqa.org/en/latest/user/options.html
flake8 . --count --show-source --statistics --max-line-length=127 --exclude=doc,spacy-lookup
- name: Code formatting with black
run: black --check src --exclude spacy-lookup
- name: Type checking with mypy
run: mypy src --exclude spacy-lookup
- name: Test with pytest
run: pytest test/