Skip to content

Merge pull request #269 from ESA-WEED-project/mb_point-info-speed-up #609

Merge pull request #269 from ESA-WEED-project/mb_point-info-speed-up

Merge pull request #269 from ESA-WEED-project/mb_point-info-speed-up #609

name: Unit Tests
# Trigger this workflow on every push to any branch
on:
push:
branches:
- '**' # Run on all branches
# Define the job to run the unit tests using a matrix for multiple Python versions
jobs:
test:
runs-on: ubuntu-latest # Use the latest Ubuntu runner
# Use a matrix strategy to test across multiple Python versions
strategy:
matrix:
python-version: [3.11, 3.12]
# Define the steps for setting up the environment and running tests
steps:
# Step 1: Checkout the repository's code
- name: Checkout code
uses: actions/checkout@v4
# Step 2: Set up Python environment based on the matrix version
- name: Set up Python environment with uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
# Step 3: Install dependencies from requirements.txt
- name: Install dependencies
run: |
uv pip install pytest
uv pip install requests-mock
uv pip install pytest-xdist
uv pip install pytest-cov
uv pip install rio-cogeo
uv pip install -r requirements.txt
# Step 4: Run unit tests using pytest, targeting the 'tests_unit' directory
- name: Run Unit tests
run: |
uv run pytest tests/ --disable-warnings