-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.42 KB
/
build_test.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
name: Build and Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Check formatting
uses: psf/black@stable
with:
options: "--check --verbose --exclude='tasks/segmentation/(layoutlmft|ditod)' --extend-exclude='build/lib'"
src: "."
version: ">=22.3"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install torch==2.0.1
pip install ./tasks[development]
pip install ./pipelines/segmentation
pip install ./pipelines/text_extraction
pip install ./pipelines/metadata_extraction
pip install ./pipelines/geo_referencing
pip install ./cdr
- name: Pyright type checking
uses: jakebailey/pyright-action@v1
with:
pylance-version: latest-release
project: pyrightconfig.json
- name: Test with pytest
run: |
pip install pytest-cov
pytest --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html