Skip to content

Commit

Permalink
Merge pull request #118 from NaturalHistoryMuseum/feature/117-github-…
Browse files Browse the repository at this point in the history
…workflows

[#117] GH workflow CI
  • Loading branch information
quicklizard99 committed Oct 23, 2021
2 parents fbbb558 + 16f6de5 commit e19ebc1
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 8 deletions.
53 changes: 53 additions & 0 deletions .github/worflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests

on: [push]

jobs:
build:
strategy:
matrix:
os: [ubuntu-18.04]
python-version: [2.7, 3.6, 3.7, 3.8, 3.9, 3.10]
include:
- os: macos-10.15
python-version: 3.8
# TODO Include DLLs in source code?
# - os: windows-2019
# python-version: 3.8

runs-on: ${{ matrix.os }}

steps:
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libzbar0 python-opencv
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
brew update
brew install zbar
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# TODO Both x64 and x86 on Windows
architecture: 'x64'

- name: Install dependencies
run: |
python -m pip install --upgrade pip==21.3
pip install -r requirements-test.txt
pip install coveralls>=3.2.0
- name: Run tests
run: pytest --verbose --cov=pyzbar yzbar

- name: Upload coverage
run: coveralls
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ python:

before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libzbar-dev python-opencv
- sudo apt-get install -y libzbar0 python-opencv

install:
- pip install tox-travis coveralls
Expand Down
4 changes: 1 addition & 3 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```
python -m venv venv
source ./venv/bin/activate
pip install -U pip
pip install -U pip==21.3
pip install -r requirements.txt
python -m pytest --verbose --cov=pyzbar --cov-report=term-missing --cov-report=html pyzbar
Expand Down Expand Up @@ -53,8 +53,6 @@ frozen binary.
2. Release to TestPyPI (see https://packaging.python.org/guides/using-testpypi/)

```
mkvirtualenv pypi
pip install twine
twine upload -r testpypi dist/*
```

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pyzbar
.. image:: https://badge.fury.io/py/pyzbar.svg
:target: https://pypi.python.org/pypi/pyzbar

.. image:: https://travis-ci.org/NaturalHistoryMuseum/pyzbar.svg?branch=master
:target: https://travis-ci.org/NaturalHistoryMuseum/pyzbar
.. image:: https://img.shields.io/github/workflow/status/NaturalHistoryMuseum/pyzbar/Tests/master?label=tests
:target: https://github.com/NaturalHistoryMuseum/pyzbar/actions?query=workflow%3A%22Tests

.. image:: https://coveralls.io/repos/github/NaturalHistoryMuseum/pyzbar/badge.svg?branch=master
:target: https://coveralls.io/github/NaturalHistoryMuseum/pyzbar?branch=master
Expand Down
4 changes: 2 additions & 2 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ nose>=1.3.4
numpy>=1.8.2
pathlib>=1.0.1; python_version == '2.7'
Pillow>=3.2.0
pytest
pytest-cov
pytest>=6.2.5
pytest-cov>=3.0.0

0 comments on commit e19ebc1

Please sign in to comment.