console/.github/workflows/tests-e2e.yaml

78 lines
2.1 KiB
YAML

on:
workflow_call:
inputs:
registry:
default: ghcr.io
type: string
imageName:
default: ${{ github.repository_owner }}
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: setup environment
uses: ./.github/actions/setup
with:
codegen: true
actor: test-e2e
- name: Install Cypress binary
run: pnpm cypress install
- name: patch compose file volumes
uses: mikefarah/yq@4839dbbf80445070a31c7a9c1055da527db2d5ee # v4.44.6
with:
cmd: yq -i 'del(.services.*.volumes)' docker/docker-compose.community.yml
- name: run containers
timeout-minutes: 10
run: |
docker compose \
--env-file integration-tests/.env \
-f docker/docker-compose.community.yml \
-f docker/docker-compose.end2end.yml \
up -d --wait
- name: cypress
timeout-minutes: 12
uses: cypress-io/github-action@v6
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 integration-tests/.env \
-f docker/docker-compose.community.yml \
-f docker/docker-compose.end2end.yml \
logs
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
if: ${{ failure() }}
with:
name: cypress
path: |
./cypress/videos/**/*
./cypress/screenshots/**/*