Merge/dds #2600
Workflow file for this run
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
name: Functional Test | |
on: | |
pull_request: | |
workflow_dispatch: | |
env: | |
IMAGE_NAME: localhost:5000/orion-ld-test:latest | |
IGNORE_TEST: '0706_direct_https_notifications/direct_https_notifications.test 0706_direct_https_notifications/direct_https_notifications_no_accept_selfsigned.test 2015_notification_templates/notification_templates_cache_refresh.test 0000_ipv6_support/ipv4_ipv6_both.test 0740_crash_with_json_object_for_attributes/json_object_format.test 0000_ngsild/ngsild_datasetId_entity_relationship_creation.test 0000_ngsild/ngsild_entities_get_by_type.test 0000_ngsild/ngsild_entity_creation_strange_chars_in_attr_names.test 0000_ngsild/ngsild_entity_creation_with_japanese_chars.test 0000_ngsild/ngsild_issue_0737.test 0000_ngsild/ngsild_query_entities_geo_error.test 2871_fwd_update_ok_but_not_found_response/fwd_update_ok_but_not_found_response.test' | |
## Cancel running tests, get faster test-results for the latest commit | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-test-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
file: docker/Dockerfile-test | |
tags: ${{ env.IMAGE_NAME }} | |
outputs: type=docker,dest=/tmp/test-image.tar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-image | |
path: /tmp/test-image.tar | |
test: | |
runs-on: ubuntu-latest | |
needs: build-test-image | |
services: | |
mosquitto: | |
image: eclipse-mosquitto:1.6 | |
ports: | |
- 1883:1883 | |
- 9001:9001 | |
postgres: | |
image: postgis/postgis:12-3.1-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_HOST_AUTH_METHOD: trust | |
ports: | |
- 5432:5432 | |
# Currently not used as functional test is started with "d" flag that results in locally started mongodb | |
# mongodb: | |
# image: mongo:4.4 | |
# ports: | |
# - 27017:27017 | |
context-server: | |
image: wistefan/context-server:0.2.0 | |
env: | |
MEMORY_ENABLED: true | |
ports: | |
- 7080:8080 | |
strategy: | |
fail-fast: false | |
#max-parallel: 1 | |
matrix: | |
test: [ 'functional_0_700','functional_701_1200', 'functional_1201_1600', 'functional_1601_end' ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: test-image | |
path: /tmp | |
- name: Load Docker image | |
run: | | |
docker load --input /tmp/test-image.tar | |
- name: Run functional test | |
run: | | |
docker run --rm --network host -v $(pwd):/opt/orion -e CB_FT_VERBOSE=true -e CB_SKIP_FUNC_TESTS='${{ env.IGNORE_TEST}}' -e ORIONLD_CACHED_CONTEXT_DIRECTORY=/opt/orion/ldcontexts -e CB_FT_VERBOSE=ON ${{ env.IMAGE_NAME }} -s ${{ matrix.test }} -dqt |