forked from Open-IoT-Service-Platform/platform-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github action workflow for e2e test
Signed-off-by: Marcel <[email protected]>
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: End2End Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
push: | ||
branches: | ||
- develop | ||
- '**-v[0-9]+.[0-9]+' | ||
- '**-test' | ||
tags: | ||
- 'v**' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Prepare platform | ||
shell: bash | ||
run: | | ||
export TERM=vt100 | ||
cd util && \ | ||
bash setup-ubuntu20.04.sh | ||
- name: Setup subrepos | ||
shell: bash | ||
run: | | ||
export TERM=vt100 | ||
sudo apt install jq | ||
git submodule update --recursive --init | ||
make update | ||
- name: Build platform | ||
run: | | ||
export TERM=vt100 | ||
yes | DOCKER_TAG=test NODOCKERLOGIN=true DEBUG=true make build | ||
- name: E2E Test | ||
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 | ||
until [ ${retval} -eq 0 ]; do | ||
make undeploy-oisp | ||
(for i in {1..20}; do sleep 60; echo .; done&) && make deploy-oisp-test | ||
if [[ "<< parameters.upgrade-test >>" = "true" ]] && [[ -n "${CURRENT_RELEASE_VERSION}" ]]; | ||
then | ||
(for i in {1..20}; do sleep 60; echo .; done&) && make upgrade-oisp DOCKER_TAG=test USE_LOCAL_REGISTRY=true KEYCLOAK_FORCE_MIGRATION="true" | ||
kubectl -n $(NAMESPACE) scale deployment debugger --replicas=1 | ||
fi | ||
make test | ||
retval=$? | ||
done | ||