File tree Expand file tree Collapse file tree 10 files changed +84
-309
lines changed
Expand file tree Collapse file tree 10 files changed +84
-309
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,13 @@ ARG QGIS_TEST_VERSION=latest
22FROM qgis/qgis:${QGIS_TEST_VERSION}
33
44# Install system dependencies
5- RUN apt-get clean && \
6- rm -rf /var/lib/apt/lists/* && \
7- apt-get update -o Acquire::Retries=3 && \
8- apt-get install -y --no-install-recommends \
9- python3-pip \
10- xvfb \
11- xauth \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
5+ RUN apt-get update && \
6+ apt-get install -y --no-install-recommends python3-pip && \
7+ apt-get clean && \
8+ rm -rf /var/lib/apt/lists/*
149
15- # Copy and install Python test dependencies
16- COPY ./requirements_test.txt /tmp/
17- RUN pip3 install --no-cache-dir -r /tmp/requirements_test.txt --break-system-packages
10+ COPY ./pyproject.toml /tmp/
11+ RUN pip3 install "/tmp/.[test]" --break-system-packages
1812
1913# Set environment variables
2014ENV LANG=C.UTF-8
@@ -23,4 +17,4 @@ ENV IS_DOCKER_CONTAINER=true
2317ENV QT_QPA_PLATFORM=offscreen
2418ENV DISPLAY=:99
2519
26- WORKDIR /usr/src
20+ WORKDIR /
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ services:
44 context : ..
55 dockerfile : ./.docker/Dockerfile
66 args :
7- QGIS_TEST_VERSION : ${QGIS_TEST_VERSION}
7+ QGIS_TEST_VERSION : ${QGIS_TEST_VERSION:-latest }
88 tty : true
99 volumes :
10- - ${GITHUB_WORKSPACE}:/usr/src/ThRasE
10+ - ${GITHUB_WORKSPACE:-.}:/usr/src/ThRasE
11+ working_dir : /usr/src/ThRasE
Original file line number Diff line number Diff line change 22
33set -e
44
5- pushd /usr/src
6- DEFAULT_PARAMS= ' ./ThRasE/tests/ -v --qgis_disable_gui --qgis_disable_init '
7- xvfb-run -a -s " -screen 0 1920x1080x24 " pytest ${ @:- `echo $DEFAULT_PARAMS `}
8- popd
5+ cd /usr/src/ThRasE
6+
7+ DEFAULT_PARAMS= ' ./tests/ -v --qgis_disable_gui --qgis_disable_init '
8+ xvfb-run pytest ${ @:- $DEFAULT_PARAMS }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 88 - " docs/**"
99
1010concurrency :
11- group : " pages"
11+ group : pages
1212 cancel-in-progress : false
1313
1414permissions :
@@ -18,24 +18,24 @@ jobs:
1818 build-docs :
1919 runs-on : ubuntu-latest
2020 steps :
21- - uses : actions/checkout@v4
22-
23- - name : " Set up Python 3.10 "
24- uses : actions/setup-python@v4
25- with :
26- python-version : " 3.10 "
27-
28- - name : Install dependencies
29- run : |
30- python -m pip install --upgrade pip
31- pip install -r requirements_docs.txt
32-
33- - name : Build
34- run : |
35- jupyter-book build docs
36-
37- - name : Deploy to GitHub Pages
38- uses : peaceiris/actions-gh-pages@v4
39- with :
40- github_token : ${{ secrets.GITHUB_TOKEN }}
41- publish_dir : docs/_build/html
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Python
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : " 3.12 "
28+
29+ - name : Install dependencies
30+ run : |
31+ python -m pip install --upgrade pip
32+ pip install ".[docs]"
33+
34+ - name : Build documentation
35+ run : jupyter-book build docs
36+
37+ - name : Deploy to GitHub Pages
38+ uses : peaceiris/actions-gh-pages@v4
39+ with :
40+ github_token : ${{ secrets.GITHUB_TOKEN }}
41+ publish_dir : docs/_build/html
Original file line number Diff line number Diff line change @@ -2,28 +2,39 @@ name: Tests
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66 pull_request :
7- branches : [ main ]
7+ branches : [main]
88
99jobs :
1010 tests :
1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- docker_tags : [ ltr, stable ]
14+ qgis_version : [ltr, stable]
1515 fail-fast : false
16+
1617 env :
17- QGIS_TEST_VERSION : ${{ matrix.docker_tags }}
18+ QGIS_TEST_VERSION : ${{ matrix.qgis_version }}
1819
1920 steps :
2021 - name : Checkout
2122 uses : actions/checkout@v4
2223 with :
2324 submodules : recursive
25+ lfs : true
26+
27+ - name : Set up Git LFS
28+ run : |
29+ git lfs install
30+ git lfs pull
31+
32+ - name : Build Docker image
33+ run : docker compose -f .docker/docker-compose.gh.yml build
2434
25- - name : Pull QGIS Docker image
26- run : docker pull qgis/ qgis:${QGIS_TEST_VERSION}
35+ - name : Run tests
36+ run : docker compose -f .docker/docker-compose.gh.yml run --rm qgis /usr/src/ThRasE/.docker/run-docker-tests.sh
2737
28- - name : Run tests with Docker
29- run : docker compose -f .docker/docker-compose.gh.yml run qgis /usr/src/ThRasE/.docker/run-docker-tests.sh
38+ - name : Cleanup
39+ if : always()
40+ run : docker compose -f .docker/docker-compose.gh.yml down --rmi local
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments