console/.github/workflows/tests-e2e.yaml
renovate[bot] f8bbf71774
chore(deps): update mikefarah/yq action to v4.44.1 (#4739)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-12 09:10:54 +03:00

80 lines
2 KiB
YAML

on:
workflow_call:
inputs:
registry:
default: ghcr.io
type: string
imageName:
default: ${{ github.repository }}
type: string
imageTag:
required: true
type: string
jobs:
e2e:
runs-on: ubuntu-22.04
env:
DOCKER_REGISTRY: ${{ inputs.registry }}/${{ inputs.imageName }}/
DOCKER_TAG: :${{ inputs.imageTag }}
HIVE_APP_BASE_URL: 'http://localhost:8080'
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup environment
uses: ./.github/actions/setup
with:
codegen: false
actor: test-e2e
cacheNext: false
cacheTurbo: false
- name: Install Cypress binary
run: pnpm cypress install
- name: patch compose file volumes
uses: mikefarah/yq@v4.44.1
with:
cmd: yq -i 'del(.services.*.volumes)' docker/docker-compose.community.yml
- name: run containers
timeout-minutes: 10
run: |
docker compose \
--env-file docker/.end2end.env \
-f docker/docker-compose.community.yml \
-f docker/docker-compose.end2end.yml \
up -d --wait
- name: cypress
timeout-minutes: 6
uses: cypress-io/github-action@v5
env:
CI: true
with:
command: pnpm test:e2e
install: false
browser: chrome
headed: true
- name: troubleshoot containers
if: ${{ failure() }}
run: |
docker --version
docker ps --format json | jq .
docker compose \
--env-file docker/.end2end.env \
-f docker/docker-compose.community.yml \
-f docker/docker-compose.end2end.yml \
logs
- uses: actions/upload-artifact@v4.3.3
if: ${{ failure() }}
with:
name: cypress
path: |
./cypress/videos/**/*
./cypress/screenshots/**/*