-
Notifications
You must be signed in to change notification settings - Fork 15
43 lines (42 loc) · 1.41 KB
/
unittests.yaml
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
name: lens-translation Unit Tests
on:
push:
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.11.9
uses: actions/setup-python@v5
with:
python-version: "3.11.9"
- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install flake8==7.1.1
pip install flake8_black==0.3.6
- name: Lint with flake8
run: |
flake8 --max-line-length=119 --ignore=E722,I201,I100,BLK100,W503 --per-file-ignores=__init__.py:F401 lens/app/*.py
flake8 --max-line-length=119 --ignore=E722,I201,I100,BLK100,W503 --per-file-ignores=__init__.py:F401 trans_app/app/*.py
flake8 --max-line-length=119 --ignore=E722,I201,I100,BLK100,W503 --per-file-ignores=__init__.py:F401 ocr_app/app/*.py
Unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10.12
uses: actions/setup-python@v5
with:
python-version: "3.10.12"
- name: Install libraries
run: |
python -m pip install --upgrade pip
pip install pytest==8.3.3
pip install numpy==1.23.1
pip install Pillow==9.5.0
- name: Run unit tests
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
pytest unittests/test_draw_fct.py