Skip to content

Fixes, speed improvements, some new functions #903

Fixes, speed improvements, some new functions

Fixes, speed improvements, some new functions #903

Workflow file for this run

name: Tests
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
ci-tests:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
lfs: true
- name: Upgrade pip
if: matrix.os != 'macos-latest'
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Upgrade pip on MacOS
if: matrix.os == 'macos-latest'
run: |
pip3 install --constraint=.github/workflows/constraints.txt pip
pip3 --version
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
poetry --version
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
poetry env use "3.10" # Needed to cache dependencies
poetry install --no-root
- name: Run pytest with coverage
if: ${{ (matrix.os != 'ubuntu-latest') }}
run: |
poetry run pytest -k "not tests/test_raster.py" --verbose --durations=5
- name: Run raster pytest with coverage
if: ${{ (matrix.os == 'ubuntu-latest') }}
run: |
poetry run pytest --verbose --durations=5 --cov --cov-report=term --cov-report=xml --junitxml=pytest-report.xml
- name: SonarCloud Scan
if: ${{ (matrix.os == 'ubuntu-latest') }}
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Build api-documentation
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.11') }}
run: |
poetry run sphinx-build -W docs docs/_build