dependabot[bot] b34b15d0ac Bump whoan/docker-build-with-cache-action from 5 to 6
Bumps [whoan/docker-build-with-cache-action](https://github.com/whoan/docker-build-with-cache-action) from 5 to 6.
- [Release notes](https://github.com/whoan/docker-build-with-cache-action/releases)
- [Commits](https://github.com/whoan/docker-build-with-cache-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: whoan/docker-build-with-cache-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-02 07:57:56 +10:00

106 lines
4.1 KiB
YAML

name: 🗺 OGC tests for QGIS Server
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'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare build cache for pull request
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name == 'pull_request'
with:
path: /home/runner/QGIS/.ccache
key: build-ccache-ogc-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }}
# The head_ref or source branch of the pull request in a workflow run.
# The base_ref or target branch of the pull request in a workflow run.
restore-keys: |
build-ccache-ogc-${{ github.actor }}-${{ github.head_ref }}-
build-ccache-ogc-refs/heads/${{ github.base_ref }}-
build-ccache-ogc-refs/heads/master-
- name: Prepare build cache for branch/tag
# use a fork of actions/cache@v2 to upload cache even when the build or test failed
uses: pat-s/always-upload-cache@v3.0.11
if: github.event_name != 'pull_request'
with:
path: /home/runner/QGIS/.ccache
# The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/<branch_name>, and for tags it is refs/tags/<tag_name>
key: build-ccache-ogc-${{ github.ref }}-${{ github.sha }}
restore-keys: |
build-ccache-ogc-${{ github.ref }}-
build-ccache-ogc-refs/heads/master-
- name: Build Docker Container with Build Environment
id: docker-build
uses: whoan/docker-build-with-cache-action@v6
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
image_name: qgis-deps-ogc
context: .ci/ogc
dockerfile: Dockerfile
push_git_tag: true
push_image_and_stages: on:push
pull_image_and_stages: ${{ github.event_name != 'workflow_dispatch' }}
- 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.FULL_IMAGE_NAME }}
- 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.0 && 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.FULL_IMAGE_NAME }}
- 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.FULL_IMAGE_NAME }}