add CI :fingers_crossed:
parent
5b1634d6b3
commit
9a6730ef3a
@ -0,0 +1,41 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||
|
||||
name: CLI Tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.7', '3.8', '3.9']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
pip install flake8
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Install package
|
||||
run: make install
|
||||
- name: Cache models
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: detectron-models
|
||||
path: /home/runner/.local/share/ocrd-resources/ocrd-sbb-binarize/*
|
||||
- name: Install dependencies for test
|
||||
# also downloads models, if not already present
|
||||
run: make models test/assets
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
Loading…
Reference in New Issue