forked from micasense/imageprocessing
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.17 KB
/
python-test.yml
File metadata and controls
48 lines (45 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Unit tests
on:
workflow_call:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
test:
needs: [lint]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v5
with:
lfs: true
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get -qq install exiftool libgdal-dev libzbar0t64
GDAL_VERSION=$(gdal-config --version)
pip install "gdal==$GDAL_VERSION"
- name: Test with pytest
run: |
pip install -e .[test]
pytest -m "not newgdal" --cov=./ --cov-report=xml
- uses: actions/upload-artifact@v4
if: ${{ matrix.python-version == '3.12' }}
with:
name: coverage-report
path: coverage.xml