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

oisp dependency removal 1st step- component id(cid) check removed. #68

oisp dependency removal 1st step- component id(cid) check removed.

oisp dependency removal 1st step- component id(cid) check removed. #68

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
else
make restart-cluster
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 && bash install-local-platform.sh
- 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: 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
loops=0
export DOCKER_TAG=test
export USE_LOCAL_REGISTRY=true
until [ ${retval} -eq 0 ] || [ ${loops} -gt 3 ]; do
make undeploy-oisp
(for i in {1..20}; do sleep 60; echo .; done&) && make deploy-oisp-test
make test
retval=$?
loops=$((loops+1))
done
echo Test return value: ${retval}
exit ${retval}