Skip to content

Commit

Permalink
fixup! Embed pre_e2e script in the workflow directly
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulrhmnGhanem committed Jun 29, 2023
1 parent c3a98e6 commit a6a8d21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions scripts/pre_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a6a8d21

Please sign in to comment.