Skip to content

Commit

Permalink
Add github action workflow for e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel <[email protected]>
  • Loading branch information
wagmarcel committed Nov 20, 2021
1 parent 3345733 commit 736b10b
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/makefile.yaml
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

0 comments on commit 736b10b

Please sign in to comment.