Skip to content

CI : améliore l'exécution des tests #2

CI : améliore l'exécution des tests

CI : améliore l'exécution des tests #2

Workflow file for this run

name: Tests
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
unit-test:
name: "🎳 Unit tests"
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- ubuntu-22.04
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- name: Get source code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install system dependencies
run: |
sudo apt update
sudo apt -y install python3-rados python3-gdal
- name: Install project requirements
run: |
python -m pip install -U pip setuptools wheel
python -m pip install GDAL=="`gdal-config --version`.*"
python -m pip install -e .[test]
- name: Upload coverage to Codecov
uses: codecov/[email protected]
- name: Run unit tests
run: |
coverage run -m pytest
coverage report -m
- uses: actions/upload-artifact@v3
with:
name: python_wheel
path: dist/*
if-no-files-found: error