Merge pull request #59 from bertsky/change-model-url
update to GH release archive as model URLpull/65/head
commit
7afe7574b5
@ -1,45 +1,31 @@
|
||||
version: 2
|
||||
version: 2.1
|
||||
|
||||
jobs:
|
||||
|
||||
build-python37:
|
||||
build-python:
|
||||
parameters:
|
||||
python-version:
|
||||
type: string
|
||||
docker:
|
||||
- image: python:3.7
|
||||
- image: cimg/python:<< parameters.python-version >>
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- ocrd-resources-{{ checksum "requirements.txt" }}-{{ checksum "Makefile" }}
|
||||
- run: make install
|
||||
- run: make model
|
||||
- run: make models
|
||||
- save_cache:
|
||||
key: ocrd-resources-{{ checksum "requirements.txt" }}-{{ checksum "Makefile" }}
|
||||
paths:
|
||||
ocrd-resources
|
||||
- run: git submodule update --init
|
||||
- run: make test
|
||||
|
||||
build-python38:
|
||||
docker:
|
||||
- image: python:3.8
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- ocrd-resources-{{ checksum "requirements.txt" }}-{{ checksum "Makefile" }}
|
||||
- run: make install
|
||||
- run: make model
|
||||
- save_cache:
|
||||
key: ocrd-resources-{{ checksum "requirements.txt" }}-{{ checksum "Makefile" }}
|
||||
paths:
|
||||
ocrd-resources
|
||||
- run: git submodule update --init
|
||||
- run: make test
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- build-python37
|
||||
- build-python38
|
||||
- build-python:
|
||||
matrix:
|
||||
parameters:
|
||||
python-version: ['3.7', '3.8', '3.9', '3.10']
|
||||
|
||||
|
@ -0,0 +1,43 @@
|
||||
# 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', '3.10']
|
||||
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: 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
|
||||
- name: Setup upterm session when failure
|
||||
if: failure()
|
||||
uses: lhotari/action-upterm@v1
|
||||
|
Loading…
Reference in New Issue