Skip to content

build(ci): run pytest in CI as GitHub action #10

build(ci): run pytest in CI as GitHub action

build(ci): run pytest in CI as GitHub action #10

Workflow file for this run

name: pytest
on:
pull_request:
push:
branches: [main]
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install gdal freetype and zbar
run: sudo apt-get install -y libgdal-dev libfreetype6-dev libzbar0
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
- name: Install dependencies
run: |
poetry install
- name: Install gdal python package
run: |
poertry run pip install gdal=="$(gdal-config --version).*"
- name: Run tests
run: |
poetry run pytest tests/unit