Skip to content

Commit

Permalink
Merge pull request #871 from pantheon-systems/LOPS-2012
Browse files Browse the repository at this point in the history
[LOPS-2012] Remove behat
  • Loading branch information
namespacebrian authored Mar 11, 2024
2 parents 0b2d9a4 + 35477a0 commit d8f81f7
Show file tree
Hide file tree
Showing 16 changed files with 1,353 additions and 5,587 deletions.
101 changes: 1 addition & 100 deletions .ci/.github/workflows/build_deploy_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,113 +237,14 @@ jobs:
source $BASH_ENV
./.ci/deploy/pantheon/dev-multidev
behat_test:
container:
image: quay.io/pantheon-public/build-tools-ci:6.x
options: --user root
runs-on: ubuntu-latest
continue-on-error: true
needs: [deploy_to_pantheon]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache bash_env.txt
uses: actions/cache@v2
env:
cache-name: cache-bash-env
with:
path: bash_env.txt
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@v2
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@v2
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@v2
env:
cache-name: cache-web
with:
path: ./web
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Cache drush folder
uses: actions/cache@v2
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@v2
with:
name: behat-report
path: /tmp/artifacts
visual_regression_test:
container:
image: backstopjs/backstopjs:5.3.2
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: Update git version
run: |
Expand Down
44 changes: 0 additions & 44 deletions .ci/test/behat/cleanup

This file was deleted.

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

This file was deleted.

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

This file was deleted.

48 changes: 3 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ defaults: &defaults
# ADMIN_EMAIL: The email address to give the admin when installing.
#=========================================================================
TZ: "/usr/share/zoneinfo/America/Los_Angeles"

# The variables below usually do not need to be modified.

#======================================================================================================================================
# Circle CI 2.0 does not yet expand environment variables so they have to be manually EXPORTed
# Once environment variables can be expanded the variables below can be uncommented and the EXPORTs in set-up-globals.sh can be removed
# See: https://discuss.circleci.com/t/unclear-how-to-work-with-user-variables-circleci-provided-env-variables/12810/11
# See: https://discuss.circleci.com/t/environment-variable-expansion-in-working-directory/11322
# See: https://discuss.circleci.com/t/circle-2-0-global-environment-variables/8681
#======================================================================================================================================

NOTIFY: 'scripts/github/add-commit-comment {project} {sha} "Created multidev environment [{site}#{env}]({dashboard-url})." {site-url}'
ADMIN_USERNAME: admin
TERM: dumb
Expand Down Expand Up @@ -143,44 +143,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:
name: prepare for Behat testing
command: ./.ci/test/behat/initialize

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

- 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
docker:
Expand Down Expand Up @@ -244,10 +206,6 @@ workflows:
branches:
ignore:
- master
- behat_test:
requires:
- deploy_to_pantheon
- visual_regression_test

#scheduled_update_check:
# triggers:
Expand Down
35 changes: 1 addition & 34 deletions .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 @@ -95,7 +94,7 @@ deploy:pantheon:

test:visual-regression:
stage: visual-test
image:
image:
name: backstopjs/backstopjs:4.1.9
entrypoint: [""]
variables:
Expand All @@ -121,38 +120,6 @@ test:visual-regression:
except:
- schedules

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:
- deploy:pantheon
- test:visual-regression
only:
- merge_requests
- master
except:
- schedules

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

schedule:composer:update:
stage: updates
script:
Expand Down
Loading

0 comments on commit d8f81f7

Please sign in to comment.