Skip to content

Commit

Permalink
Unittests in github actions / more make targets
Browse files Browse the repository at this point in the history
  • Loading branch information
hnesk committed Nov 1, 2020
1 parent 4d305c6 commit fe48bd1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ name: Install and Unittest

on:
workflow_dispatch:
#push:
# branches: [ master ]
#pull_request:
# branches: [ master ]
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
Expand All @@ -27,10 +27,7 @@ jobs:
- name: Install system dependencies
run: sudo make deps-ubuntu
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
make deps
run: make deps dep-dev install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ MANIFEST
htmlcov/
.tox/
.nox/
build_artifacts/

# Translations
*.mo
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ SHARE_DIR=~/.local/share
deps-ubuntu:
apt install -y libcairo2-dev libgtk-3-dev libglib2.0-dev libgtksourceview-3.0-dev libgirepository1.0-dev pkg-config cmake

deps-dev:
$(PIP) install -r requirements-dev.txt

deps:
$(PIP) install -r requirements.txt

Expand Down Expand Up @@ -50,8 +53,7 @@ pypi: clean-build build
twine upload ./dist/browse[_-]ocrd*.{tar.gz,whl}

test: tests/assets
$(PYTHON) -m unittest discover -s tests

$(PYTHON) -m xmlrunner discover -s tests -o `readlink -f build_artifacts/tests`

# Clone OCR-D/assets to ./repo/assets
repo/assets:
Expand Down
5 changes: 5 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
wheel
setuptools
unittest-xml-reporting
flake8
mypy

0 comments on commit fe48bd1

Please sign in to comment.