File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : apertium-python CI Build
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ build :
7
+
8
+ runs-on : ubuntu-latest
9
+ strategy :
10
+ matrix :
11
+ python-version : [3.6, 3.7, 3.8]
12
+
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ - name : Set up Python ${{ matrix.python-version }}
16
+ uses : actions/setup-python@v2
17
+ with :
18
+ python-version : ${{ matrix.python-version }}
19
+ - name : Install dependencies
20
+ run : |
21
+ python -m pip install --upgrade pip
22
+ pip install pipenv
23
+ python3 setup.py install
24
+ pipenv install --dev --system
25
+ - name : Flake8 checks
26
+ run : |
27
+ flake8 --verbose apertium
28
+ - name : mypy checks
29
+ run : |
30
+ mypy apertium --strict --any-exprs-report .mypy_coverage --ignore-missing-imports
31
+ cat .mypy_coverage/any-exprs.txt
32
+ coverage=$(tail -1 .mypy_coverage/any-exprs.txt | grep -Eo '[0-9\.]+%' | sed 's/%$//')
33
+ if (( $(echo "$coverage < 95" | bc -l) )); then
34
+ exit 1
35
+ fi
36
+ - name : code coverage and unittest
37
+ run : |
38
+ coverage run -m unittest --verbose --buffer tests
39
+ coverage report --show-missing --fail-under 90 --include 'apertium/*'
You can’t perform that action at this time.
0 commit comments