Skip to content

Commit

Permalink
Merge pull request #77 from dynobo/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dynobo authored Apr 25, 2020
2 parents 90f0d00 + d993c7b commit 1e96a0e
Show file tree
Hide file tree
Showing 15 changed files with 361 additions and 180 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ jobs:
steps:
- uses: actions/checkout@master

# SET ENV VARS
- name: Set environment variables
uses: allenevans/set-env@v1.0.0
with:
CI: "true"

# PREPARE
- name: Install Python 3.7
# Because GitHub Actions' python isn't build against tkinter!
Expand All @@ -31,6 +25,8 @@ jobs:
run: python3.7 -m pip install --user pipenv
- name: Create virtual env
run: $HOME/.local/bin/pipenv install --dev
env:
CI: true

# TEST
- name: Test with pytest
Expand Down Expand Up @@ -68,6 +64,8 @@ jobs:
run: python3.7 -m pip install --user pipenv
- name: Create virtual env
run: $HOME/Library/Python/3.7/bin/pipenv install --dev
env:
CI: true

# TEST
- name: Test with pytest
Expand Down Expand Up @@ -102,6 +100,9 @@ jobs:
run: python -m pip install --user pipenv
- name: Create virtual env
run: C:\Users\runneradmin\AppData\Roaming\Python\Python37\Scripts\pipenv install --dev
env:
CI: true

- name: Install tesserocr
run: >
C:\Users\runneradmin\AppData\Roaming\Python\Python37\Scripts\pipenv
Expand Down
63 changes: 29 additions & 34 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,40 @@ on: ["push"]
name: Coveralls

jobs:

build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/checkout@v1
# PREPARE
- name: Install Python 3.7
# Because GitHub Actions' python isn't build against tkinter!
run: sudo apt-get update && sudo apt-get install python3.7 python3.7-dev python3.7-tk python3-setuptools
- name: Symlink apt-pkg lib
# to make pipenv working with different python versions
run: cd /usr/lib/python3/dist-packages/ && sudo ln -s apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so
- name: Install normcap dependencies
run: sudo apt-get install tesseract-ocr tesseract-ocr-deu libtesseract-dev libleptonica-dev pkg-config xclip
- name: Install wheel
run: python3.7 -m pip install --user wheel
- name: Install pipenv
run: python3.7 -m pip install --user pipenv
- name: Create virtual env
run: $HOME/.local/bin/pipenv install --dev
env:
CI: true

# SET ENV VARS
- name: Set environment variables
uses: allenevans/set-env@v1.0.0
with:
CI: 'true'

# PREPARE
- name: Install Python 3.7
# Because GitHub Actions' python isn't build against tkinter!
run: sudo apt-get update && sudo apt-get install python3.7 python3.7-dev python3.7-tk python3-setuptools
- name: Symlink apt-pkg lib
# to make pipenv working with different python versions
run: cd /usr/lib/python3/dist-packages/ && sudo ln -s apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so
- name: Install normcap dependencies
run: sudo apt-get install tesseract-ocr tesseract-ocr-deu libtesseract-dev libleptonica-dev pkg-config xclip
- name: Install wheel
run: python3.7 -m pip install --user wheel
- name: Install pipenv
run: python3.7 -m pip install --user pipenv
- name: Create virtual env
run: $HOME/.local/bin/pipenv install --dev
- name: Install coveralls
run: $HOME/.local/bin/pipenv run pip install coveralls
- name: Install coveralls
run: $HOME/.local/bin/pipenv run pip install coveralls

# TEST
- name: Test with pytest
# xvfb-run with bpp 32 has to be used to make the mss screenshot grab work
run: $HOME/.local/bin/pipenv run xvfb-run --server-args="-screen 0 1024x768x24+32" python3.7 -m pytest
# TEST
- name: Test with pytest
# xvfb-run with bpp 32 has to be used to make the mss screenshot grab work
run: $HOME/.local/bin/pipenv run xvfb-run --server-args="-screen 0 1024x768x24+32" python3.7 -m pytest

# PUBLISH
- name: Publish
run: $HOME/.local/bin/pipenv run coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
# PUBLISH
- name: Publish
run: $HOME/.local/bin/pipenv run coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
run: python3.7 -m pip install --user pipenv
- name: Create virtual env
run: $HOME/.local/bin/pipenv install --dev
env:
CI: true

# LINT
- name: Lint with flake8
Expand All @@ -50,6 +52,8 @@ jobs:
run: python3.7 -m pip install --user pipenv
- name: Create virtual env
run: $HOME/Library/Python/3.7/bin/pipenv install --dev
env:
CI: true

# LINT
- name: Lint with flake8
Expand All @@ -65,18 +69,14 @@ jobs:
steps:
- uses: actions/checkout@master

# SET ENV VARS
- name: Set environment variables
uses: allenevans/set-env@v1.0.0
with:
CI: "true"

# PREPARE
- name: Install pipenv
run: >
python -m pip install --user pipenv
- name: Create virtual env
run: C:\Users\runneradmin\AppData\Roaming\Python\Python37\Scripts\pipenv install --dev
env:
CI: true
- name: Install tesserocr
run: >
C:\Users\runneradmin\AppData\Roaming\Python\Python37\Scripts\pipenv
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.1.4 (2020-04-25)

**Changes:**

- Add fallback for Wayland DE on Linux, see [Issue 76](https://github.com/dynobo/normcap/issues/76#issue-605722434)

## v0.1.3 (2020-04-04)

**Changes:**
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Pillow = "*"
tesserocr = {platform_system = "!= 'Windows'",version = "*"}
# numpy = "*"
# opencv-python-headless = "*"
pyscreenshot = "*"

[dev-packages]
pytest = "==5.3.0"
Expand Down
Loading

0 comments on commit 1e96a0e

Please sign in to comment.