Skip to content

Commit

Permalink
TASK: Passthru the target branch
Browse files Browse the repository at this point in the history
  • Loading branch information
markusguenther committed Sep 19, 2024
1 parent 8905c2e commit 9001897
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ jobs:
name: Login to GitHub
command: |
echo $AUTH_TOKEN_GITHUB | gh auth login --with-token
- run:
name: Define target branch
command: |
TARGET_BRANCH=$(gh pr view $CIRCLE_PULL_REQUEST --json baseRefName --jq '.baseRefName')
echo "Target Branch: $TARGET_BRANCH"
- run:
name: Install Sauce Connect
command: |
Expand All @@ -131,14 +126,17 @@ jobs:
background: true
command: sc run --username ${SAUCE_USERNAME} --access-key ${SAUCE_ACCESS_KEY} --tunnel-name "circleci-tunnel" --region "us-west-1" --proxy-localhost allow
- run:
name: Prepare and run e2e tests
no_output_timeout: 30m
command: |
TARGET_BRANCH=$(gh pr view $CIRCLE_PULL_REQUEST --json baseRefName --jq '.baseRefName')
echo "Using target branch: $TARGET_BRANCH"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
cd /home/circleci/app/Packages/Application/Neos.Neos.Ui
nvm install
nvm use
make test-e2e-saucelabs
make test-e2e-saucelabs "$TARGET_BRANCH"
- store_artifacts:
path: /home/circleci/app/Data/Logs
- persist_to_workspace:
Expand Down
2 changes: 2 additions & 0 deletions .sauce/config1Dimension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ sauce:
build: Release $CI_COMMIT_SHORT_SHA
tunnel:
name: "circleci-tunnel"
env:
branch: $TARGET_BRANCH
testcafe:
version: 3.6.2
# Controls what files are available in the context of a test run (unless explicitly excluded by .sauceignore).
Expand Down
3 changes: 2 additions & 1 deletion Tests/IntegrationTests/e2e-saucelabs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ for fixture in Packages/Application/Neos.Neos.Ui/Tests/IntegrationTests/Fixtures
./flow resource:publish

cd Packages/Application/Neos.Neos.Ui
saucectl run --config .sauce/config${dimension}.yml
echo "Running saucectl with config .sauce/config${dimension}.yml for $TARGET_BRANCH"
saucectl run --config .sauce/config${dimension}.yml --env TARGET_BRANCH=$1
cd ../../..
rm -f DistributionPackages/Neos.TestSite

Expand Down

0 comments on commit 9001897

Please sign in to comment.