diff --git a/.github/workflows/e2e_test.yml b/.github/workflows/e2e_test.yml index fbae5c73f..7ad1154a1 100644 --- a/.github/workflows/e2e_test.yml +++ b/.github/workflows/e2e_test.yml @@ -47,15 +47,7 @@ jobs: run: while [ $((curl localhost:7474/ > /dev/null 2>&1); echo $?) -ne 0 ]; do sleep 1; done - name: Setup test rails app - run: | - if [ "${{ github.event_name }}" == "pull_request" ]; then - # For pull requests, get the SHA of the last commit in the PR - COMMIT_SHA=$(jq -r '.pull_request.head.sha' < "${{ github.event_path }}") - else - # For push events (like master branch), use the commit SHA - COMMIT_SHA="${{ github.sha }}" - fi - ./e2e_tests/setup.sh $COMMIT_SHA + run: e2e_tests/setup.sh - name: Install dependencies run: bundle update diff --git a/e2e_tests/setup.sh b/e2e_tests/setup.sh index 7a7556801..0fe70e57b 100755 --- a/e2e_tests/setup.sh +++ b/e2e_tests/setup.sh @@ -1,14 +1,11 @@ #!/bin/sh # Example values of environment variables ACTIVE_MODEL_VERSION=7.1.3 ACTIVEGRAPH_PATH=../ E2E_PORT=7687 E2E_NO_CRED=true + +rm -r ./myapp gem install rails -v $ACTIVE_MODEL_VERSION --no-document -if [[ -n "$ACTIVEGRAPH_PATH" ]] -then - sed 's|.*gem '"'"'activegraph'"'"'.*|gem '"'"'activegraph'"'"', path: "'"$ACTIVEGRAPH_PATH"'"|' docs/activegraph.rb > template.tmp -else - sed 's/.*gem '"'"'activegraph'"'"'.*/gem '"'"'activegraph'"'"', github: "neo4jrb\/activegraph", ref: "'"$1"'"/' docs/activegraph.rb > template.tmp -fi +sed 's|.*gem '"'"'activegraph'"'"'.*|gem '"'"'activegraph'"'"', path: '"'"'../'"'"'|' docs/activegraph.rb > template.tmp rails \_$ACTIVE_MODEL_VERSION\_ new myapp -O -m ./template.tmp rm -f ./template.tmp