Skip to content

update(ci): use Python 3.12 to fit QGIS shipped version #91

update(ci): use Python 3.12 to fit QGIS shipped version

update(ci): use Python 3.12 to fit QGIS shipped version #91

Workflow file for this run

name: "🎳 Tester"
on:
push:
branches:
- master
paths:
- "**.py"
- .github/workflows/tester.yml
- requirements/embedded.txt
- requirements/testing.txt
pull_request:
branches:
- master
paths:
- "**.py"
- .github/workflows/tester.yml
- requirements/embedded.txt
- requirements/testing.txt
env:
PROJECT_FOLDER: "qgis_resource_sharing"
PYTHON_VERSION: "3.12"
jobs:
tests-unit:
runs-on: ubuntu-latest
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
cache-dependency-path: "requirements/testing.txt"
- name: Install Python requirements
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U -r requirements/testing.txt
- name: Run Unit tests
run: pytest -p no:qgis tests/unit/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
test-qgis:
runs-on: ubuntu-latest
container:
image: qgis/qgis:release-3_22
env:
CI: true
DISPLAY: ":1"
MUTE_LOGS: true
NO_MODALS: 1
PYTHONPATH: "/usr/share/qgis/python/plugins:/usr/share/qgis/python:."
QT_QPA_PLATFORM: "offscreen"
WITH_PYTHON_PEP: false
options: -v /tmp/.X11-unix:/tmp/.X11-unix -v ${{ github.workspace }}:/tests_directory
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Print QGIS version
run: qgis --version
- name: Setup plugin
run: qgis_setup.sh qgis_resource_sharing
- name: Install Python requirements
run: |
python3 -m pip install -U pip setuptools wheel
python3 -m pip install --no-deps -U -r requirements/embedded.txt -t ${{ env.PROJECT_FOLDER }}/embedded_external_libs
python3 -m pip install -U -r requirements/testing.txt
- name: Run Unit tests
run: |
Xvfb :1 &
python3 -m pytest tests/qgis/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4