Prepare release v2.1.1 #119
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
# workflow name | |
name: Tests | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the wanted branches | |
on: | |
pull_request: | |
push: | |
branches: [master, main] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
linux_tests: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Remove unsupported versions and add more versions. Use LTR version in the cov_tests job | |
docker_tags: [release-3_10, latest] | |
fail-fast: false | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Pull qgis | |
run: docker pull qgis/qgis:${{ matrix.docker_tags }} | |
# Runs all tests | |
- name: Run tests | |
run: docker run --rm --net=host --volume `pwd`:/app -w=/app -e QGIS_PLUGIN_IN_CI=1 qgis/qgis:${{ matrix.docker_tags }} sh -c "pip3 install -q pytest && xvfb-run -s '+extension GLX -screen 0 1024x768x24' pytest -v" | |
cov_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Pull qgis LTR image | |
run: docker pull qgis/qgis:release-3_16 | |
# Runs all tests | |
- name: Run tests (LTR) | |
run: docker run --rm --net=host --volume `pwd`:/app -w=/app -e QGIS_PLUGIN_IN_CI=1 qgis/qgis:release-3_16 sh -c "pip3 install -q pytest pytest-cov && xvfb-run -s '+extension GLX -screen 0 1024x768x24' pytest -v --cov --cov-report=xml" | |
# Upload coverage report | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
fail_ci_if_error: false # set to true when upload is working | |
verbose: false | |
windows_tests: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Choco install qgis-ltr 3.22.5 | |
uses: crazy-max/ghaction-chocolatey@v1 | |
with: | |
args: install qgis-ltr -y --version 3.22.5 | |
- name: Run tests | |
shell: pwsh | |
run: | | |
$env:PATH="C:\Program Files\QGIS 3.22.5\bin;$env:PATH" | |
$env:QGIS_PLUGIN_IN_CI=1 | |
python-qgis-ltr.bat -m pip install -q pytest | |
python-qgis-ltr.bat -m pytest -v |