forked from urbanogilson/SICAR
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.48 KB
/
tests.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
name: Tests
on:
pull_request:
push:
tags-ignore:
- "**"
paths-ignore:
- '.devcontainer/**'
- '.github/**'
- 'examples/**'
- 'README.md'
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip" # caching pip dependencies
- name: Upgrade pip and setuptools
run: |
python -m pip install --upgrade pip
pip install setuptools --upgrade
- name: Run linter (black)
run: |
pip install black
black --check --verbose ./SICAR/
- name: Run interrogate
run: |
pip install interrogate
interrogate
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get -y install tesseract-ocr python3-opencv --no-install-recommends --no-upgrade --show-progress
- name: Install requirements
run: pip install --editable .[all]
- name: Run unit tests
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
coverage run --rcfile=pyproject.toml -m unittest SICAR/tests/unit/*.py SICAR/tests/unit/drivers/*.py
coverage report
coveralls
- name: Run integration tests
run: |
python -m unittest SICAR/tests/integration/*.py