init #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Deploy | |
# Triggers on pushes to main, dev and tags. | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- develop | |
tags: | |
- '*' | |
paths: | |
# Only run test and docker publish if some code have changed | |
- 'pyproject.toml' | |
- 'titiler/**' | |
- '.pre-commit-config.yaml' | |
- '.github/workflows/ci.yml' | |
# Run tests on pull requests. | |
pull_request: | |
env: | |
LATEST_PY_VERSION: '3.12' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e .["test"] | |
- name: run pre-commit | |
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }} | |
run: | | |
python -m pip install pre-commit | |
pre-commit run --all-files | |
- name: Run tests | |
run: python -m pytest --cov titiler.stacapi --cov-report term-missing -s -vv |