Skip to content

Commit

Permalink
Run the tests automatically via Github Actions Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dbast committed Sep 3, 2023
1 parent 39e7ebe commit f734c66
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- dev
- main
pull_request:

concurrency:
# Concurrency group that uses the workflow name and PR number if available
# or commit SHA as a fallback. If a new build is triggered under that
# concurrency group while a previous build is running it will be canceled.
# Repeated pushes to a PR will cancel all previous builds, while multiple
# merges to main will not cancel.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install fonts-open-sans libzbar0
python -m pip install --upgrade pip
pip install -r requirements.txt -r tests/requirements.txt
pip install .
- name: Test with pytest
run: |
pytest

0 comments on commit f734c66

Please sign in to comment.