Merge pull request #34 from mapchete/automated-dependency-sync #218
This file contains hidden or 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: Python package test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 8 * * 1,4' | |
| workflow_call: | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| os: ["ubuntu-latest"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download updated dependencies | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: updated-deps | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Lint | |
| run: | | |
| python -m pip install pre-commit | |
| pre-commit run --show-diff-on-failure --all-files | |
| - name: Install GIS Dependencies | |
| run: | | |
| sudo apt-add-repository -y ppa:ubuntugis/ubuntugis-unstable | |
| sudo apt-get -y update | |
| sudo apt-get install -y gdal-bin libgdal-dev libproj-dev libgeos-dev g++ | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| env: | |
| CURL_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt | |
| GDAL_CONFIG: /usr/bin/gdal-config | |
| run: | | |
| # uv sync will prefer the downloaded uv.lock if it exists | |
| uv sync --all-extras | |
| - name: run | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REQUEST_PAYER: ${{ vars.AWS_REQUEST_PAYER }} | |
| AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} | |
| CDSE_S3_ACCESS_KEY: ${{ secrets.CDSE_S3_ACCESS_KEY }} | |
| CDSE_S3_ACCESS_SECRET: ${{ secrets.CDSE_S3_ACCESS_SECRET }} | |
| CURL_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt | |
| run: uv run pytest -v --cov mapchete_eo --cov-report xml:coverage.xml --cov-report=term-missing:skip-covered --junitxml=pytest.xml | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: mapchete/mapchete-eo |