-
-
Notifications
You must be signed in to change notification settings - Fork 3k
102 lines (90 loc) · 3.37 KB
/
ogc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: 🗺 OGC tests for QGIS Server
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
- release-**
- queued_ltr_backports
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'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: /home/runner/QGIS/.ccache
key: build-ccache-ogc-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-ccache-ogc-master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker Container
id: docker-build
uses: docker/build-push-action@v6
with:
tags: qgis/qgis-deps-ogc:${{ github.event.pull_request.base.ref || github.ref_name }}
context: .ci/ogc
file: .ci/ogc/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
- name: Run build
run: |
docker run -v $(pwd):/usr/src/qgis -v /home/runner/QGIS/.ccache:/root/.ccache ${DOCKER_IMAGE} /usr/src/qgis/.ci/ogc/build.sh
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
- name: Save build cache for push only
uses: actions/cache/save@v4
if: ${{ github.event_name == 'push' }}
with:
path: /home/runner/QGIS/.ccache
key: build-ccache-ogc-${{ github.ref_name }}-${{ github.run_id }}
- name: Install pyogctest
run: |
sudo apt-get update && sudo apt-get install python3-virtualenv virtualenv git
git clone https://github.com/pblottiere/pyogctest
cd pyogctest && git checkout 1.1.1 && cd -
virtualenv -p /usr/bin/python3 venv && source venv/bin/activate && pip install -e pyogctest/
- name: Run WMS 1.3.0 OGC tests
run: |
source venv/bin/activate && ./pyogctest/pyogctest.py -s wms130 -e
docker compose -f .ci/ogc/docker-compose.yml up -d
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
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
- name: Run OGC API Features 1.0 tests
run: |
cd data && git clone https://github.com/qgis/QGIS-Training-Data && cd -
docker compose -f .ci/ogc/docker-compose.yml up -d
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
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}