Skip to content

Move to qgis/qgis image #42

Move to qgis/qgis image

Move to qgis/qgis image #42

Workflow file for this run

name: QGIS Plugin CI
on:
push:
branches:
- '**'
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
container:
image: qgis/qgis:ltr
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set Environment Variables
run: |
echo "QGIS_HOME=/usr" >> $GITHUB_ENV
echo "PYTHONPATH=$QGIS_HOME/share/qgis/python" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$QGIS_HOME/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Start Virtual Display
run: Xvfb :99 -screen 0 1024x768x24 &
- name: Configure Earth Engine Credentials # TODO: add secret to github
run: |
mkdir -p ~/.config/earthengine
echo '${{ secrets.EE_CREDENTIALS_JSON }}' > ~/.config/earthengine/credentials
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
- name: Run pre-commit checks
run: |
pre-commit run --all-files
- name: Run tests with coverage
run: |
python -m pytest --cov=. --cov-report=html --cov-report=term-missing test/
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/