use system python #254
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: QGIS Plugin CI | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
UV_SYSTEM_PYTHON: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up QGIS environment | |
run: | | |
sudo apt update | |
sudo apt install -y qgis python3-qgis python3-pyqt5 python3-pytest | |
- name: Set Environment Variables | |
run: | | |
echo "QGIS_HOME=/usr" >> $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 | |
run: | | |
mkdir -p ~/.config/earthengine | |
echo '${{ secrets.EE_CREDENTIALS_JSON }}' > ~/.config/earthengine/credentials | |
- uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Install dependencies | |
run: | | |
uv sync --dev --locked | |
- name: Run pre-commit checks | |
run: | | |
uv run pre-commit run --all-files | |
- name: Run tests with coverage | |
run: | | |
uv run 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/ |