feat: Allow some virtuals to be discarded if not considered safe #321
Workflow file for this run
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: Tests 🎳 | |
on: | |
push: | |
tags: | |
- "*" | |
branches: | |
- master | |
paths: | |
- 'lizmap_server/**' | |
- 'test/**' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'lizmap_server/**' | |
- 'test/**' | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
architecture: x64 | |
- name: Checkout | |
uses: actions/checkout@v4.2.2 | |
- name: Install Python requirements | |
run: make install-tests | |
- name: Run ruff | |
run: make lint | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
qgis_version: [ | |
"3.28", | |
"3.34", | |
"3.40", | |
"nightly-release", | |
] | |
# container: 3liz/qgis-platform:${{ matrix.qgis_version }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4.2.2 | |
with: | |
submodules: 'true' | |
- name: Create dir | |
run: | | |
mkdir .local | |
mkdir .cache | |
- name: Running tests | |
run: >- | |
docker run | |
--rm | |
--name qgis-server | |
-u $(id -u) | |
-e PIP_CACHE_DIR=/.cache | |
-w /src/test | |
-e PYTEST_ADDOPTS="" | |
-e QGIS_SERVER_LIZMAP_REVEAL_SETTINGS=TRUE | |
-e CI="True" | |
-v ${GITHUB_WORKSPACE}:/src | |
-v ${GITHUB_WORKSPACE}/.cache:/.cache | |
-v ${GITHUB_WORKSPACE}/.local:/.local | |
3liz/qgis-platform:${{ matrix.qgis_version }} | |
./run-tests.sh | |
release: | |
needs: [tests, linter] | |
runs-on: ubuntu-latest | |
if: github.repository_owner == '3liz' && contains(github.ref, 'refs/tags/') | |
steps: | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/checkout@v4.2.2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
cache-dependency-path: "requirements/packaging.txt" | |
- name: Install Python requirements | |
run: pip install -r requirements/packaging.txt | |
- name : Fetch current changelog | |
run: qgis-plugin-ci changelog ${{ env.RELEASE_VERSION }} >> release.md | |
- name: Create release on GitHub | |
uses: ncipollo/release-action@v1.16.0 | |
with: | |
bodyFile: release.md | |
token: ${{ secrets.BOT_HUB_TOKEN }} | |
- name: Package and deploy the zip | |
run: >- | |
qgis-plugin-ci | |
release ${{ env.RELEASE_VERSION }} | |
--github-token ${{ secrets.BOT_HUB_TOKEN }} | |
--osgeo-username ${{ secrets.OSGEO_USERNAME }} | |
--osgeo-password ${{ secrets.OSGEO_PASSWORD }} | |
--create-plugin-repo | |
# - name: Tweet | |
# uses: mugi111/tweet-trigger-release@v1.2 | |
# with: | |
# consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
# consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
# access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} | |
# access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
# tweet_body: "New version of @LizmapForQgis server plugin ${{ env.RELEASE_VERSION }} 🦎 on #QGIS https://github.com/3liz/qgis-lizmap-server-plugin/releases" | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.BOT_HUB_TOKEN }} | |
repository: 3liz/3liz.github.io | |
event-type: merge-plugins | |
client-payload: '{"name": "lizmap_server", "version": "${{ env.RELEASE_VERSION }}", "url": "https://github.com/3liz/qgis-lizmap-server-plugin/releases/latest/download/plugins.xml"}' |