ci(github): get rid of gitlab trezor-suite image

This commit is contained in:
Carlos Garcia Ortiz karliatto
2024-09-05 18:32:25 +02:00
committed by martin
parent c9497e1c4e
commit 7e0261afbe
4 changed files with 2 additions and 99 deletions

View File

@@ -85,7 +85,7 @@ jobs:
run: |
docker compose pull
docker compose up -d ${{ matrix.CONTAINERS }}
docker compose run test-run
yarn workspace @trezor/suite-desktop-core test:e2e ${{ env.TEST_FILE }}
- name: cleanup
env:

View File

@@ -5,44 +5,10 @@ services:
environment:
- SDL_VIDEODRIVER=dummy
- XDG_RUNTIME_DIR=/var/tmp
test-run:
environment:
- TEST_FILE=$TEST_FILE
- HEADLESS=true
- CURRENTS_PROJECT_ID=$CURRENTS_PROJECT_ID
- CURRENTS_RECORD_KEY=$CURRENTS_RECORD_KEY
- CURRENTS_CI_BUILD_ID=$CURRENTS_CI_BUILD_ID
- GITHUB_WORKFLOW=$GITHUB_WORKFLOW
- GITHUB_ACTION=$GITHUB_ACTION
- GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME
- GITHUB_RUN_ID=$GITHUB_RUN_ID
- GITHUB_RUN_ATTEMPT=$GITHUB_RUN_ATTEMPT
- GITHUB_REPOSITORY=$GITHUB_REPOSITORY
- COMMIT_INFO_BRANCH=$COMMIT_INFO_BRANCH
- COMMIT_INFO_MESSAGE=$COMMIT_INFO_MESSAGE
- COMMIT_INFO_EMAIL=$COMMIT_INFO_EMAIL
- COMMIT_INFO_AUTHOR=$COMMIT_INFO_AUTHOR
- COMMIT_INFO_SHA=$COMMIT_INFO_SHA
- COMMIT_INFO_TIMESTAMP=$COMMIT_INFO_TIMESTAMP
- COMMIT_INFO_REMOTE=$COMMIT_INFO_REMOTE
image: registry.gitlab.com/satoshilabs/trezor/trezor-suite/base:latest
container_name: desktop-test-runner
ipc: host
network_mode: service:trezor-user-env-unix
working_dir: /trezor-suite
command: bash -c "yarn workspace @trezor/suite-desktop-core test:e2e $TEST_FILE"
volumes:
- ../:/trezor-suite
network_mode: host
electrum-regtest:
image: ghcr.io/trezor/electrs:latest
volumes:
- ../:/trezor-suite
network_mode: service:trezor-user-env-unix
# coinjoin-backend:
# image: ghcr.io/trezor/coinjoin-backend:latest
# network_mode: service:trezor-user-env-unix
# volumes:
# - ../:/coinjoin-backend

View File

@@ -1,35 +0,0 @@
version: "3.9"
services:
trezor-user-env-unix:
image: ghcr.io/trezor/trezor-user-env
environment:
- DISPLAY=$DISPLAY
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
test-run:
environment:
- DISPLAY=$DISPLAY
- LOCAL_USER_ID=$LOCAL_USER_ID
- TEST_FILE=$TEST_FILE
- PWDEBUG=1
image: registry.gitlab.com/satoshilabs/trezor/trezor-suite/base:latest
ipc: host
network_mode: service:trezor-user-env-unix
working_dir: /trezor-suite
command: bash -c "yarn workspace @trezor/suite-desktop-core test:e2e $TEST_FILE"
volumes:
- ../:/trezor-suite
- /tmp/.X11-unix:/tmp/.X11-unix:rw
electrum-regtest:
image: ghcr.io/trezor/electrs:latest
volumes:
- ../:/trezor-suite
network_mode: service:trezor-user-env-unix
coinjoin-backend:
image: ghcr.io/trezor/coinjoin-backend:latest
network_mode: service:trezor-user-env-unix
volumes:
- ../:/coinjoin-backend

View File

@@ -1,28 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086
set -e
# todo: resolve selective xhost permissions
# todo: resolve generated files permissions
xhost +
LOCAL_USER_ID="$(id -u "$USER")"
export LOCAL_USER_ID
export TEST_FILE=$1
CONTAINERS="trezor-user-env-unix test-run"
if [ "$1" == 'coinjoin' ]
then
CONTAINERS="${CONTAINERS} coinjoin-backend"
fi
if [ "$1" == 'electrum' ]
then
CONTAINERS="${CONTAINERS} electrum-regtest"
fi
echo "${CONTAINERS}"
docker compose -f ./docker/docker-compose.suite-desktop-test.yml up --build --abort-on-container-exit --remove-orphans --force-recreate ${CONTAINERS}