Skip to content

Commit

Permalink
Merge pull request #28 from pantheon-systems/BUGS-7319
Browse files Browse the repository at this point in the history
[BUGS-7319] Remove behat
  • Loading branch information
namespacebrian authored Mar 11, 2024
2 parents 107e193 + 2f4393b commit 84b3fb6
Show file tree
Hide file tree
Showing 18 changed files with 9 additions and 667 deletions.
38 changes: 0 additions & 38 deletions d9/.ci/test/behat/cleanup

This file was deleted.

32 changes: 0 additions & 32 deletions d9/.ci/test/behat/initialize

This file was deleted.

36 changes: 0 additions & 36 deletions d9/.ci/test/behat/run

This file was deleted.

22 changes: 1 addition & 21 deletions d9/providers/bitbucket-pipelines/bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,6 @@ default_steps: &default_steps
- ./.ci/test/visual-regression/run
artifacts:
- backstop_data/**
- step:
name: Test Behat
services:
- docker
caches:
- docker
- composer
script:
- *bash_env_export
- *bash_env_source
- ./.ci/test/behat/initialize
# Start headless Chrome
- google-chrome --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --no-sandbox </dev/null &>/dev/null &
- ./.ci/test/behat/run
after-script:
- *bash_env_export
- *bash_env_source
- ./.ci/test/behat/cleanup
artifacts:
- behat-screenshots/**

image: quay.io/pantheon-public/build-tools-ci:8.x-php8.1

Expand Down Expand Up @@ -117,4 +97,4 @@ pipelines:
- export CI_PROJECT_NAME=$BITBUCKET_REPO_FULL_NAME && echo $CI_PROJECT_NAME
- /build-tools-ci/scripts/set-environment
- terminus -n auth:login --machine-token="$TERMINUS_TOKEN"
- set -e && terminus project:clu $TERMINUS_SITE
- set -e && terminus project:clu $TERMINUS_SITE
47 changes: 0 additions & 47 deletions d9/providers/circleci/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,49 +126,6 @@ jobs:
name: deploy to Pantheon
command: ./.ci/deploy/pantheon/dev-multidev

behat_test:
<<: *defaults
steps:
- checkout

- restore_cache:
keys:
- composer-cache-{{ checksum "composer.lock" }}
- composer-cache-

- run:
# Set TERMINUS_ENV and related environment variables.
# https://github.com/pantheon-systems/docker-build-tools-ci/blob/6.x/scripts/set-environment
name: setup-environment-vars
command: /build-tools-ci/scripts/set-environment

- run:
# Uncomment line 26 in .ci/test/behat/initialize to create a backup
# prior to running Behat tests. This is useful to reset the multidev
# environment to the previous state after Behat tests have run.
name: prepare for Behat testing
command: ./.ci/test/behat/initialize

- run:
name: run acceptance tests with Behat
command: ./.ci/test/behat/run

- run:
# Uncomment line 13 in .ci/test/behat/cleanup to restore a backup
# after running Behat tests. This is useful to reset the multidev
# environment to the previous state after Behat tests have run.
name: clean up after Behat
command: ./.ci/test/behat/cleanup
when: always

- save_cache:
key: composer-cache-{{ checksum "composer.lock" }}
paths:
- $HOME/.composer/cache

- store_artifacts:
path: /tmp/artifacts
destination: artifacts

visual_regression_test:
<<: *defaults
Expand Down Expand Up @@ -231,10 +188,6 @@ workflows:
branches:
ignore:
- master
- behat_test:
requires:
- deploy_to_pantheon
- visual_regression_test

scheduled_update_check:
triggers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,118 +194,13 @@ jobs:
git config --global --add safe.directory $GITHUB_WORKSPACE
./.ci/deploy/pantheon/dev-multidev
behat_test:
container:
image: quay.io/pantheon-public/build-tools-ci:8.x-php8.1
options: --user root
runs-on: ubuntu-latest
continue-on-error: true
needs: [deploy_to_pantheon]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref || github.ref_name }}

- name: Set bash_env env var
run: echo BASH_ENV=${RUNNER_TEMP}/bash_env.txt >> $GITHUB_ENV

- name: Cache bash_env.txt
uses: actions/cache@v3
env:
cache-name: cache-bash-env
with:
path: ${{ env.BASH_ENV }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_number }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache composer cache
uses: actions/cache@v3
env:
cache-name: cache-composer-cache
with:
path: ~/.composer/cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache vendor folder
uses: actions/cache@v3
env:
cache-name: cache-vendor
with:
path: ./vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}

- name: Cache web folder
uses: actions/cache@v3
env:
cache-name: cache-web
with:
path: ./web
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_number }}

- name: Cache drush folder
uses: actions/cache@v3
env:
cache-name: cache-drush
with:
path: ./drush
key: ${{ runner.os }}-build-${{ env.cache-name }}

# Set TERMINUS_ENV and related environment variables.
# https://github.com/pantheon-systems/docker-build-tools-ci/blob/6.x/scripts/set-environment
- name: setup-environment-vars
run: /build-tools-ci/scripts/set-environment

# Uncomment line 26 in .ci/test/behat/initialize to create a backup
# prior to running Behat tests. This is useful to reset the multidev
# environment to the previous state after Behat tests have run.
- name: prepare for Behat testing
run: |
echo "$SSH_PRIVATE_KEY" > ../private.key
chmod 600 ../private.key
eval `ssh-agent -s`
ssh-add ../private.key
source $BASH_ENV
./.ci/test/behat/initialize
- name: run acceptance tests with Behat
run: |
eval `ssh-agent -s`
ssh-add ../private.key
./.ci/test/behat/run
# Uncomment line 13 in .ci/test/behat/cleanup to restore a backup
# after running Behat tests. This is useful to reset the multidev
# environment to the previous state after Behat tests have run.
- name: clean up after Behat
if: ${{ always() }}
run: |
eval `ssh-agent -s`
ssh-add ../private.key
source $BASH_ENV
./.ci/test/behat/cleanup
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: behat-report
path: /tmp/artifacts

visual_regression_test:
container:
image: backstopjs/backstopjs:6.1.0
options: --user root
runs-on: ubuntu-latest
if: ${{ github.ref != 'refs/heads/master' }}
needs: [configure_env_vars, behat_test]
needs: [configure_env_vars]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
30 changes: 1 addition & 29 deletions d9/providers/gitlab-pipelines/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ stages:
- configure-and-build
- deploy
- visual-test
- behat-test
- cleanup
- updates

Expand Down Expand Up @@ -115,36 +114,9 @@ test:visual-regression:
only:
- merge_requests

test:behat:
stage: behat-test
script:
- ./.ci/test/behat/initialize
# Start headless Chrome
- google-chrome --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --no-sandbox </dev/null &>/dev/null &
- ./.ci/test/behat/run
artifacts:
paths:
- behat-screenshots
dependencies:
- test:visual-regression
only:
- merge_requests
- master

test:behat:cleanup:
stage: cleanup
when: always
script:
- ./.ci/test/behat/cleanup
only:
- merge_requests
- master
dependencies:
- test:behat

schedule:composer:update:
stage: updates
script:
- set -e && terminus project:clu $TERMINUS_SITE
only:
- schedules
- schedules
Loading

0 comments on commit 84b3fb6

Please sign in to comment.