feat(3814): tweak public cloud create test to run in github actions #365
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: 32.Run E2E Tests | |
on: | |
push: | |
paths-ignore: | |
- data-migrations/** | |
- helm/** | |
- terraform/** | |
- tools/** | |
workflow_dispatch: | |
jobs: | |
e2e: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 20 | |
steps: | |
- uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6 | |
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc | |
- name: Setup Tools | |
uses: ./.github/actions/setup-tools | |
- name: Setup NPM Packages | |
uses: ./.github/actions/setup-npm | |
- name: Run App build | |
run: npm run build | |
working-directory: app | |
- name: Install Docker Compose v2 | |
# See https://docs.docker.com/compose/install/linux/ | |
run: | | |
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} | |
mkdir -p $DOCKER_CONFIG/cli-plugins | |
curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose | |
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose | |
docker compose version | |
- name: Setup Localdev Environment | |
run: | | |
mkdir -p ./localdev/mnt/mongodb | |
mkdir -p ./localdev/mnt/postgres | |
export MACHINE_HOST_IP=$(hostname -I | awk '{print $1}') | |
~/.docker/cli-plugins/docker-compose -f localdev/docker-compose.yml up -d | |
node_modules/.bin/wait-on http://localhost:8080/health/ready --timeout 120000 | |
node_modules/.bin/wait-on http://localhost:8080/realms/platform-services/.well-known/openid-configuration --timeout 240000 | |
cp app/.env.example app/.env.test | |
- name: Run App | |
run: | | |
npm start --prefix app & | |
node_modules/.bin/wait-on http://localhost:3000 --timeout 120000 | |
- name: Cypress run | |
run: npm run cypress-headless | |
- name: Upload Cypress Screenshots and Videos | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cypress-artifacts | |
path: |- | |
/home/runner/work/platform-services-registry/platform-services-registry/cypress/screenshots | |
/home/runner/work/platform-services-registry/platform-services-registry/cypress/videos | |
if: ${{ failure() }} | |
- name: Clean Up Localdev Environment | |
run: | | |
~/.docker/cli-plugins/docker-compose -f localdev/docker-compose.yml down | |
sudo rm -rf ./localdev/mnt |