Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

oisp-mqtt-gw: removed postgres Database functions and running on node… #85

oisp-mqtt-gw: removed postgres Database functions and running on node…

oisp-mqtt-gw: removed postgres Database functions and running on node… #85

Workflow file for this run

name: End2End Test
on:
pull_request:
branches:
- develop
push:
branches:
- develop
- '**-debugtest'
jobs:
build:
env:
SELF_HOSTED_RUNNER: true
runs-on: private
steps:
- uses: actions/checkout@v3
with:
repository: Open-IoT-Service-Platform/platform-launcher.git
ref: 'develop'
path: platform-launcher
- uses: actions/checkout@v3
with:
repository: IndustryFusion/DigitalTwin
path: DigitalTwin
- name: Setup main repo + subrepos
shell: bash
run: |
export TERM=vt100
if [ -z "${SELF_HOSTED_RUNNER}" ]; then
sudo apt install jq
fi
cd platform-launcher
git submodule update --init --recursive
make update
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: platform-launcher/oisp-mqtt-gw
- name: Prepare platform
shell: bash
working-directory: platform-launcher
run: |
export TERM=vt100
if [ -z "${SELF_HOSTED_RUNNER}" ]; then
cd util && \
bash setup-ubuntu20.04.sh
fi
- name: Prepare Digital Twin
working-directory: DigitalTwin
shell: bash
run: |
if [ -z "${SELF_HOSTED_RUNNER}" ]; then
( cd ./test && bash ./prepare-platform.sh )
else
( cd ./test && bash ./prepare-platform-for-self-hosted-runner.sh )
fi
- name: Prepare Bats Framework
working-directory: DigitalTwin
shell: bash
run: |
cd ./test/bats
bash ./prepare-test.sh
bats linting.bats
shellcheck *.sh *.bats test-*/*.bats
- name: Build Digital Twin locally
working-directory: DigitalTwin
shell: bash
run: |
cd ./test && bash build-local-platform.sh
- name: Install Digital Twin from local registry
working-directory: DigitalTwin
shell: bash
run: |
cd ./test
retval=2
loops=0
until bash install-local-platform.sh || [ ${loops} -gt 3 ]; do
loops=$((loops+1))
echo loop: ${loops}
k3d cluster delete iff-cluster
if [ -z "${SELF_HOSTED_RUNNER}" ]; then
bash ./prepare-platform.sh
else
bash ./prepare-platform-for-self-hosted-runner.sh
fi
done
if [ ${loops} -gt 3 ]; then exit 1; fi
- name: Build platform
working-directory: platform-launcher
shell: bash
run: |
set +o pipefail
export TERM=vt100
yes | DOCKER_TAG=test NODOCKERLOGIN=true DEBUG=true make build
- name: Prepare OISP Bats Framework
working-directory: platform-launcher
shell: bash
run: |
cd ./tests/bats
bash ./prepare-bats.sh
bats linting.bats
shellcheck *.sh *.bats test-*/*.bats
- name: E2E Test
id: e2etest
working-directory: platform-launcher
shell: bash
run: |
set +e
export TERM=vt100
export PATH=$PATH:/snap/bin
make import-images DOCKER_TAG=test DEBUG=true
docker image prune -a -f
rm -rf oisp-*
npm install nodemailer
export NODOCKERLOGIN=true
retval=2
export DOCKER_TAG=test
export USE_LOCAL_REGISTRY=true
make deploy-oisp-test
make test
retval=$?
echo Test return value: ${retval}
exit ${retval}