From a6a8d212204c70c0518dd770621779405f918977 Mon Sep 17 00:00:00 2001 From: Abdulrhmn Ghanem Date: Thu, 29 Jun 2023 10:47:12 +0300 Subject: [PATCH] fixup! Embed pre_e2e script in the workflow directly --- .github/workflows/docker.yml | 5 +++++ scripts/pre_e2e.sh | 14 -------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 15ae46e8ee..f5ae87d02c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -332,10 +332,15 @@ jobs: GITEA_DEPLOY_IMAGE_TAG: ':${{ needs.get_version.outputs.gitea_sha_short }}' shell: bash run: | + auto_gen_fixtures_path=e2e/cypress/fixtures/auto-gen + mkdir $auto_gen_fixtures_path + truncate -s "${MAX_FILE_SIZE}" "${auto_gen_fixtures_path}/big.txt" + # generate admin token used for importing projects during e2e tests docker-compose -f docker-compose.yml -f docker-compose.deploy.yml up -d until docker logs kitspace_gitea_1 | grep 'ORM engine initialization successful' ; do sleep 3s; done token="$(deno run --allow-env --allow-net --allow-run ./scripts/importBoardsTxt.ts --tokenOnly)" echo "CYPRESS_GITEA_ADMIN_TOKEN=${token}" >> $GITHUB_ENV + docker-compose stop - name: e2e timeout-minutes: 40 diff --git a/scripts/pre_e2e.sh b/scripts/pre_e2e.sh index f1c4be342a..3bb4066a33 100755 --- a/scripts/pre_e2e.sh +++ b/scripts/pre_e2e.sh @@ -6,17 +6,3 @@ set -Eeuo pipefail auto_gen_fixtures_path=e2e/cypress/fixtures/auto-gen mkdir $auto_gen_fixtures_path truncate -s "${MAX_FILE_SIZE}" "${auto_gen_fixtures_path}/big.txt" - -# generate admin token used for importing projects during e2e tests - -if [[ "${CI:-}" = "true" ]]; then - docker-compose -f docker-compose.yml -f docker-compose.deploy.yml up -d - until docker logs kitspace_gitea_1 | grep 'ORM engine initialization successful' ; do sleep 3s; done -else - # The tests are running locally. - docker-compose up -d -fi - -token="$(deno run --allow-env --allow-net --allow-run ./scripts/importBoardsTxt.ts --tokenOnly)" -export CYPRESS_GITEA_ADMIN_TOKEN=$token -docker-compose stop