-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from NaturalHistoryMuseum/feature/117-github-…
…workflows [#117] GH workflow CI
- Loading branch information
Showing
5 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters