-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into better_negative_storage_support
- Loading branch information
Showing
15 changed files
with
100 additions
and
40 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,12 @@ | ||
version: '2' | ||
|
||
services: | ||
qgis: | ||
image: qgis/qgis:release-3_34 | ||
container_name: qgis | ||
volumes: | ||
- ../ribasim_qgis/:/tests_directory/ribasim_qgis | ||
environment: | ||
- CI=true | ||
- DISPLAY=:99 | ||
tty: true |
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,7 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
|
||
docker compose -f compose.yml up -d --force-recreate --remove-orphans | ||
echo "Installation of the plugin Ribasim" | ||
docker exec -t qgis sh -c "qgis_setup.sh ribasim_qgis" | ||
echo "Containers are running" |
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,6 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
|
||
echo 'Stopping/killing containers' | ||
docker compose -f compose.yml kill | ||
docker compose -f compose.yml rm -f |
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,4 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
|
||
docker exec -t qgis sh -c "cd /tests_directory && xvfb-run -a qgis_testrunner.sh ribasim_qgis.tests" |
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 |
---|---|---|
|
@@ -8,27 +8,21 @@ on: | |
pull_request: | ||
paths-ignore: [".teamcity/**"] | ||
merge_group: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
test: | ||
name: QGIS plugin ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macOS-latest | ||
- windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: "latest" | ||
- name: Run tests | ||
run: pixi run test-ribasim-qgis-cov | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
test-qgis: | ||
name: "Test" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: .docker | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: "latest" | ||
- name: Run tests | ||
run: pixi run test-ribasim-qgis-docker | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
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
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[run] | ||
source = . | ||
omit = | ||
ribasim_qgis/resources.py | ||
ribasim_qgis/tests/* | ||
ribasim_qgis/tomllib/* | ||
ribasim_qgis/ui_tests/* | ||
*/resources.py | ||
*/tests/* | ||
*/tomllib/* |
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
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 @@ | ||
import sys | ||
from pathlib import Path | ||
|
||
import coverage | ||
from qgis.testing import unittest | ||
|
||
testfolder = Path(__file__).parent | ||
|
||
|
||
def run_all(): | ||
test_loader = unittest.defaultTestLoader | ||
test_suite = test_loader.discover(".", pattern="test_*.py") | ||
|
||
cov = coverage.Coverage(config_file=testfolder.parent / ".coveragerc") | ||
cov.start() | ||
unittest.TextTestRunner(verbosity=3, stream=sys.stdout).run(test_suite) | ||
|
||
cov.stop() | ||
cov.save() | ||
cov.xml_report(outfile=testfolder / "coverage.xml") |
Empty file.
File renamed without changes.
This file was deleted.
Oops, something went wrong.