2021-03-22 13:15:43 +10:00
|
|
|
|
name: 🗺 OGC tests for QGIS Server
|
|
|
|
|
|
2023-10-09 15:19:20 +02:00
|
|
|
|
concurrency:
|
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
2021-03-22 13:15:43 +10:00
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- master
|
|
|
|
|
- release-**
|
2021-04-28 08:56:17 +10:00
|
|
|
|
- queued_ltr_backports
|
2021-03-22 13:15:43 +10:00
|
|
|
|
paths:
|
|
|
|
|
- 'src/core/**'
|
|
|
|
|
- 'src/auth/**'
|
|
|
|
|
- 'src/providers/**'
|
|
|
|
|
- 'src/server/**'
|
|
|
|
|
- 'src/CMakeLists.txt'
|
|
|
|
|
- 'external/**'
|
|
|
|
|
- 'CMakeLists.txt'
|
|
|
|
|
- '.github/workflows/ogc.yml'
|
|
|
|
|
pull_request:
|
|
|
|
|
branches:
|
|
|
|
|
- master
|
|
|
|
|
- release-**
|
|
|
|
|
paths:
|
|
|
|
|
- 'src/core/**'
|
|
|
|
|
- 'src/auth/**'
|
|
|
|
|
- 'src/providers/**'
|
|
|
|
|
- 'src/server/**'
|
|
|
|
|
- 'src/CMakeLists.txt'
|
|
|
|
|
- 'external/**'
|
|
|
|
|
- 'CMakeLists.txt'
|
|
|
|
|
- '.github/workflows/ogc.yml'
|
|
|
|
|
|
2024-01-21 15:35:52 +01:00
|
|
|
|
permissions:
|
|
|
|
|
contents: read
|
|
|
|
|
|
2021-03-22 13:15:43 +10:00
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
2023-10-01 19:50:29 +00:00
|
|
|
|
uses: actions/checkout@v4
|
2021-03-22 13:15:43 +10:00
|
|
|
|
|
2024-03-02 12:07:09 +01:00
|
|
|
|
- name: Restore build cache
|
2024-04-01 19:01:54 +00:00
|
|
|
|
uses: actions/cache/restore@v4
|
2021-06-24 13:51:49 +02:00
|
|
|
|
with:
|
|
|
|
|
path: /home/runner/QGIS/.ccache
|
2024-03-02 12:07:09 +01:00
|
|
|
|
key: build-ccache-ogc-${{ github.event.pull_request.base.ref || github.ref_name }}
|
2021-06-24 13:51:49 +02:00
|
|
|
|
restore-keys: |
|
2024-03-02 12:07:09 +01:00
|
|
|
|
build-ccache-ogc-master
|
2021-06-24 13:51:49 +02:00
|
|
|
|
|
2024-03-02 20:23:55 +01:00
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
|
|
- name: Build Docker Container
|
2021-06-24 13:51:49 +02:00
|
|
|
|
id: docker-build
|
2024-07-01 19:28:29 +00:00
|
|
|
|
uses: docker/build-push-action@v6
|
2021-06-24 13:51:49 +02:00
|
|
|
|
with:
|
2024-03-02 20:23:55 +01:00
|
|
|
|
tags: qgis/qgis-deps-ogc:${{ github.event.pull_request.base.ref || github.ref_name }}
|
2021-06-24 13:51:49 +02:00
|
|
|
|
context: .ci/ogc
|
2024-03-02 20:23:55 +01:00
|
|
|
|
file: .ci/ogc/Dockerfile
|
|
|
|
|
cache-from: type=gha
|
|
|
|
|
cache-to: type=gha,mode=max
|
|
|
|
|
load: true
|
2021-03-22 13:15:43 +10:00
|
|
|
|
|
|
|
|
|
- name: Run build
|
|
|
|
|
run: |
|
2021-06-24 13:51:49 +02:00
|
|
|
|
docker run -v $(pwd):/usr/src/qgis -v /home/runner/QGIS/.ccache:/root/.ccache ${DOCKER_IMAGE} /usr/src/qgis/.ci/ogc/build.sh
|
|
|
|
|
env:
|
2024-03-02 20:23:55 +01:00
|
|
|
|
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
|
2021-03-22 13:15:43 +10:00
|
|
|
|
|
2024-03-02 12:07:09 +01:00
|
|
|
|
- name: Save build cache for push only
|
2024-04-01 19:01:54 +00:00
|
|
|
|
uses: actions/cache/save@v4
|
2024-03-02 12:07:09 +01:00
|
|
|
|
if: ${{ github.event_name == 'push' }}
|
|
|
|
|
with:
|
|
|
|
|
path: /home/runner/QGIS/.ccache
|
2024-03-14 18:53:16 +01:00
|
|
|
|
key: build-ccache-ogc-${{ github.ref_name }}-${{ github.run_id }}
|
2024-03-02 12:07:09 +01:00
|
|
|
|
|
2021-03-22 13:15:43 +10:00
|
|
|
|
- name: Install pyogctest
|
|
|
|
|
run: |
|
2021-06-24 17:53:57 +02:00
|
|
|
|
sudo apt-get update && sudo apt-get install python3-virtualenv virtualenv git
|
2021-03-22 13:15:43 +10:00
|
|
|
|
git clone https://github.com/pblottiere/pyogctest
|
2023-12-23 23:32:54 +01:00
|
|
|
|
cd pyogctest && git checkout 1.1.1 && cd -
|
2021-03-22 13:15:43 +10:00
|
|
|
|
virtualenv -p /usr/bin/python3 venv && source venv/bin/activate && pip install -e pyogctest/
|
|
|
|
|
|
|
|
|
|
- name: Run WMS 1.3.0 OGC tests
|
|
|
|
|
run: |
|
2021-11-22 12:09:56 +01:00
|
|
|
|
source venv/bin/activate && ./pyogctest/pyogctest.py -s wms130 -e
|
2024-04-02 21:36:51 +00:00
|
|
|
|
docker compose -f .ci/ogc/docker-compose.yml up -d
|
2021-11-25 16:17:47 +01:00
|
|
|
|
source venv/bin/activate && ./pyogctest/pyogctest.py -n ogc_qgis -s wms130 -v -u http://$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qgis_server_nginx)/qgisserver_wms130
|
2021-06-24 19:35:59 +02:00
|
|
|
|
env:
|
2024-03-02 21:22:26 +01:00
|
|
|
|
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
|
2021-11-22 12:09:56 +01:00
|
|
|
|
|
|
|
|
|
- name: Run OGC API Features 1.0 tests
|
|
|
|
|
run: |
|
2021-11-25 17:59:50 +01:00
|
|
|
|
cd data && git clone https://github.com/qgis/QGIS-Training-Data && cd -
|
2024-04-02 21:36:51 +00:00
|
|
|
|
docker compose -f .ci/ogc/docker-compose.yml up -d
|
2021-11-25 16:17:47 +01:00
|
|
|
|
source venv/bin/activate && ./pyogctest/pyogctest.py -n ogc_qgis -s ogcapif -v -u http://$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qgis_server_nginx)/qgisserver_ogcapif
|
2021-11-25 16:51:57 +01:00
|
|
|
|
env:
|
2024-03-02 21:22:26 +01:00
|
|
|
|
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
|