Skip to content

Commit

Permalink
Merge pull request International-BMP-Database#177 from Geosyntec/fix-…
Browse files Browse the repository at this point in the history
…img-comp-action

Fix img comparison action
  • Loading branch information
phobson committed Aug 20, 2020
2 parents 666378d + 8ea96de commit e03c90f
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-runtests-basic.yml
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Run unit tests (without image comparison)
name: Run basic unit tests

on:
push:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/python-runtests-img-comp.yml
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Run unit tests (with image comparison)
name: Run image comparison tests

on:
push:
Expand All @@ -13,16 +13,12 @@ jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: 3.8

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -36,4 +32,5 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
export MPL_IMGCOMP_TOLERANCE=20
python check_wqio.py --strict
4 changes: 4 additions & 0 deletions wqio/tests/helpers.py
Expand Up @@ -18,6 +18,10 @@
import pytest


def get_img_tolerance():
return int(os.environ.get("MPL_IMGCOMP_TOLERANCE", 15))


def seed(func):
""" Decorator to seed the RNG before any function. """

Expand Down

0 comments on commit e03c90f

Please sign in to comment.