-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 88537c0
Showing
6 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: 🔌 Plugin | Package and release | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
plugin-package: | ||
name: Packages and releases plugin | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Qt lrelease | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install qtbase5-dev qttools5-dev-tools | ||
- name: Install qgis-plugin-ci | ||
run: pip install qgis-plugin-ci>=2.8.6 | ||
|
||
- name: 🌍 Push translations | ||
if: ${{ github.event_name == 'push' }} | ||
run: qgis-plugin-ci push-translation ${{ secrets.TX_TOKEN }} | ||
|
||
- name: Package PyPI Packages | ||
run: ./plugin/scripts/package-pip-packages.sh | ||
|
||
- name: Package | ||
run: | | ||
VERSION=0.0.0 | ||
qgis-plugin-ci -v package ${VERSION} \ | ||
--allow-uncommitted-changes \ | ||
--asset-path plugin/pg_service_parser_dev/libs \ | ||
--transifex-token "${{ secrets.TX_TOKEN }}" | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: pg_service_parser_dev | ||
path: plugin/pg_service_parser.0.0.0.zip | ||
if-no-files-found: error |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: 🪲 Plugin | Tests | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- datamodel/** | ||
- plugin/** | ||
- '.github/workflows/plugin-test.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- datamodel/** | ||
- plugin/** | ||
- '.github/workflows/plugin-test.yml' | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
plugin-tests: | ||
name: Run unit tests on plugin | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
qgis_version: [3.28-jammy, latest] | ||
env: | ||
QGIS_TEST_VERSION: ${{ matrix.qgis_version }} | ||
COMPOSE_PROFILES: qgis | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Package PyPI Packages | ||
run: sudo ./plugin/scripts/package-pip-packages.sh | ||
|
||
- name: Download Interlis libs | ||
run: sudo ./plugin/scripts/download-interlis-libs.sh | ||
|
||
- name: Docker build | ||
run: docker compose up -d --build | ||
|
||
- name: Test on QGIS | ||
run: docker-compose run qgis /usr/src/plugin/.docker/run-docker-tests.sh | ||
|
||
- name: Test command line import orgs | ||
run: docker-compose run qgis sh -c 'xvfb-run /usr/src/plugin/tww_cmd.py interlis_import --xtf_file /usr/src/plugin/teksi_wastewater/tests/data/minimal-dataset-organisation-arbon-only.xtf --pghost db --pgdatabase tww --pguser postgres --pgpass postgres --pgport 5432' | ||
|
||
- name: Test command line import minimal sia405 | ||
run: docker-compose run qgis sh -c 'xvfb-run /usr/src/plugin/tww_cmd.py interlis_import --xtf_file /usr/src/plugin/teksi_wastewater/tests/data/minimal-dataset-SIA405-ABWASSER.xtf --pghost db --pgdatabase tww --pguser postgres --pgpass postgres --pgport 5432' | ||
|
||
- name: Test command line minimal export | ||
run: docker-compose run qgis sh -c 'xvfb-run /usr/src/plugin/tww_cmd.py interlis_export --xtf_file "output.xtf" --pghost db --pgdatabase tww --pguser postgres --pgpass postgres --pgport 5432' | ||
|
||
- name: docker logs | ||
#if: failure() | ||
run: docker compose logs db |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pg_service_parser/libs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
plugin_path: pg_service_parser | ||
github_organization_slug: opengisch | ||
project_slug: qgis-pg-service-parser-plugin | ||
|
||
transifex_coordinator: geoninja | ||
transifex_resource: swiss_locator | ||
translation_languages: | ||
- fr | ||
- de |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
LIBS_DIR="pg_service_parser/libs" | ||
|
||
echo download and unpack pgserviceparser | ||
#create temp folder | ||
mkdir -p temp | ||
#download the wheel | ||
pip download -v pgserviceparser --only-binary :all: -d temp/ | ||
#unpack all the wheels found (means including dependencies) | ||
unzip -o "temp/*.whl" -d $LIBS_DIR | ||
#remove temp folder | ||
rm -r temp | ||
#set write rights to group (because qgis-plugin-ci needs it) | ||
chmod -R g+w $LIBS_DIR | ||
|
||
#create the __init__.py in libs folder | ||
cd $LIBS_DIR | ||
touch __init__.py | ||
chmod g+w __init__.py |