All Projects → leymannx → drupal-circleci-behat

leymannx / drupal-circleci-behat

Licence: GPL-2.0 license
Test and deploy Drupal 9 with CircleCI 2.0 and Behat 3

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to drupal-circleci-behat

drupal8-employee-crud-module
No description or website provided.
Stars: ✭ 16 (-5.88%)
Mutual labels:  drupal, drupal-8
apigee-api-catalog-drupal
Manage your API catalog within Drupal's content management approach
Stars: ✭ 17 (+0%)
Mutual labels:  drupal, drupal-8
TqExtension
Test your Drupal 7 (D8 in progress) sites easier with TqExtension for Behat.
Stars: ✭ 13 (-23.53%)
Mutual labels:  drupal, behat
migrate source example
Example module for Drupal 8 that provides migrations of users, terms, files and nodes from database, JSON resources, CSV and XML files. #migrate
Stars: ✭ 39 (+129.41%)
Mutual labels:  drupal, drupal-8
Drupal8ci
One-line installers for implementing Continuous Integration in Drupal 8
Stars: ✭ 113 (+564.71%)
Mutual labels:  circleci, drupal
drevops
💧 + 🐳 + ✓✓✓ + 🤖 + ❤️ Build, Test, Deploy scripts for Drupal using Docker and CI/CD
Stars: ✭ 55 (+223.53%)
Mutual labels:  drupal, behat
docker-drupal
Docker scaffolding for Drupal 8
Stars: ✭ 41 (+141.18%)
Mutual labels:  drupal, drupal-8
DrupalTwigFood
Useful functions, filters for twig @ Drupal 8
Stars: ✭ 1 (-94.12%)
Mutual labels:  drupal, drupal-8
drupal9ci
One-line installers for implementing Continuous Integration in Drupal 9
Stars: ✭ 137 (+705.88%)
Mutual labels:  circleci, drupal
Drupalextension
An integration layer between Behat, Mink Extension, and Drupal.
Stars: ✭ 191 (+1023.53%)
Mutual labels:  drupal, behat
shila-drupal-theme
Atomic design and Pattern Lab friendly, component-based, fairly unopinionated starting point for new Drupal themes
Stars: ✭ 81 (+376.47%)
Mutual labels:  drupal, drupal-8
drupal8-oop
Tutorial for object-oriented programming fundamentals in PHP
Stars: ✭ 37 (+117.65%)
Mutual labels:  drupal, drupal-8
drupal8-composer-template
Project template for Drupal 8 projects with composer | Quick installation via "composer create-project woprrr/drupal8-composer-template:8.3.0"
Stars: ✭ 27 (+58.82%)
Mutual labels:  drupal, drupal-8
drupal-jsonapi-params
A package to manage json-api params
Stars: ✭ 42 (+147.06%)
Mutual labels:  drupal, drupal-8
distros.bid
A saas to create drupal websites in seconds using docker containers.
Stars: ✭ 16 (-5.88%)
Mutual labels:  drupal, drupal-8
varbase
Built using Drupal 8/9, an enterprise website builder platform that combines powerful editorial features, mobile, lead-generation, SEO, social media integration, and beautiful bespoke designs. Varbase is packed with adaptive functionalities and essential modules.
Stars: ✭ 75 (+341.18%)
Mutual labels:  drupal, drupal-8
apigee-devportal-kickstart-drupal
A fast demo and starting point for Apigee Developer Portals for Drupal
Stars: ✭ 21 (+23.53%)
Mutual labels:  drupal, drupal-8
drupal-react-image-gallery
Drupal 8 module that provides a dynamic Image Gallery based on the react-image-gallery component.
Stars: ✭ 13 (-23.53%)
Mutual labels:  drupal, drupal-8
campaign
Comic Relief Campaign Distribution in Drupal 8
Stars: ✭ 22 (+29.41%)
Mutual labels:  drupal, behat
dkan2
Deprecated: please use the 2.x branch of the dkan repo
Stars: ✭ 17 (+0%)
Mutual labels:  drupal, drupal-8

Drupal CirceCI Behat Selenium

kick-start example

CircleCI

tests/behat/behat.yml:

default:
  suites:
    default:
      contexts:
        - FeatureContext
        - Drupal\DrupalExtension\Context\DrupalContext
        - Drupal\DrupalExtension\Context\MinkContext
        - Drupal\DrupalExtension\Context\MessageContext
        - Drupal\DrupalExtension\Context\DrushContext
  extensions:
    Behat\MinkExtension:
      base_url: http://drupal-circleci-behat.localhost
      goutte: ~
      selenium2:
        wd_host: http://drupal-circleci-behat.localhost:4444/wd/hub
        capabilities:
          marionette: true
          browser: chrome
      browser_name: chrome
    Drupal\DrupalExtension:
      blackbox: ~
      api_driver: drupal
      drupal:
        drupal_root: '%paths.base%/../../web'

.circleci/config.yml:

version: 2
jobs:
  build:
    docker:
      - image: circleci/php:7.4-apache-node-browsers
      - image: circleci/mariadb:latest
        environment:
          - MYSQL_ROOT_HOST=%
    working_directory: ~/drupal-circleci-behat
    steps:
      - checkout
      - run:
          name: Setup Apache
          command: |
            sudo cp .circleci/env/drupal-circleci-behat.conf /etc/apache2/sites-available/drupal-circleci-behat.conf
            sudo a2ensite drupal-circleci-behat
            sudo service apache2 start
            echo 127.0.0.1 drupal-circleci-behat.localhost | sudo tee -a /etc/hosts
      - run:
          name: Setup tools
          command: |
            sudo apt-get -qq update && sudo apt-get -qqy upgrade
            sudo apt-get -yqq install libpng-dev libonig-dev mariadb-client nano xvfb
            sudo docker-php-ext-install gd mbstring mysqli pdo pdo_mysql
            sudo service apache2 restart
      - run:
          name: Start Xvfb
          command: |
            sudo Xvfb :7055
            export DISPLAY=:7055
          background: true
      - run:
          name: Download Selenium
          command: |
            curl -O http://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.5.jar
      - run:
          name: Start Selenium
          command: |
            mkdir -p /tmp/selenium
            java -jar selenium-server-standalone-3.141.5.jar -log /tmp/selenium/selenium.log
          background: true
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "composer.lock" }}
      - run:
          name: Composer Install
          command: |
            composer install -n --prefer-dist
            echo 'export PATH=$HOME/drupal-circleci-behat/vendor/bin:$PATH' >> $BASH_ENV
            source /home/circleci/.bashrc
      - save_cache:
          paths:
            - ./vendor
          key: v1-dependencies-{{ checksum "composer.lock" }}
      - run:
          name: Setup Drupal
          command: |
            cp .circleci/env/.htaccess web/.htaccess
            cp .circleci/env/settings.local.php web/sites/default/settings.local.php
            cd web
            drush -y site:install --existing-config
      - run:
          name: Tests
          command: |
            mkdir -p tests/behat/test-results/junit
            cd tests/behat
            behat --no-snippets -f pretty -o std -f junit -o test-results/junit/junit.xml
      - store_test_results:
          path: tests/behat/test-results
      - store_artifacts:
          path: /tmp/selenium
  deploy:
    machine:
      enabled: true
    working_directory: ~/drupal-circleci-behat
    steps:
      - checkout
      - run:
          name: Fix ssh Could not resolve hostname
          command: |
            ssh-keyscan "${LIVE_IP}" >> ~/.ssh/known_hosts
            ssh-keyscan "${DEV_IP}" >> ~/.ssh/known_hosts
      - add_ssh_keys:
          fingerprints:
            - "14:09:a1:b2:b3:c4:d5:e6:f7:g8:h9:81:"
      - run:
          name: Deploy main
          command: if [ "${CIRCLE_BRANCH}" == "main" ]; then ssh -p "${LIVE_PORT}" "${LIVE_USER}"@"${LIVE_IP}" "cd /var/www/wordpress-circleci-behat/scripts/deployment && . deploy.sh ${CIRCLE_SHA1}"; else echo "Skipped"; fi
      - run:
          name: Deploy dev
          command: if [ "${CIRCLE_BRANCH}" == "develop" ]; then ssh -p "${DEV_PORT}" "${DEV_USER}"@"${DEV_IP}" "cd /var/www/wordpress-circleci-behat/scripts/deployment && . deploy.sh ${CIRCLE_SHA1}"; else echo "Skipped"; fi
      - run: echo "${CIRCLE_BRANCH}"; echo "${CIRCLE_SHA1}";
workflows:
  version: 2
  build-and-deploy:
    jobs:
      - build
      - deploy:
          requires:
            - build
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].