From 8a8284cf73dadbb31e1d17056e7b8cfd13213cd9 Mon Sep 17 00:00:00 2001 From: Sally Young Date: Wed, 5 Jul 2023 11:05:31 +0100 Subject: [PATCH] Split job --- .github/workflows/TestFunctional.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/TestFunctional.yml b/.github/workflows/TestFunctional.yml index be34e5b0..0b29c597 100644 --- a/.github/workflows/TestFunctional.yml +++ b/.github/workflows/TestFunctional.yml @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true jobs: - Test-Functional: + Build: runs-on: ubuntu-latest steps: - name: Create a Drupal project @@ -47,19 +47,36 @@ jobs: ddev composer config minimum-stability dev ddev composer require "lullabot/drainpipe @dev" --with-all-dependencies ddev composer require "lullabot/drainpipe-dev @dev" --dev --with-all-dependencies - # Restart is required to enable the provided Selenium containers - ddev restart - name: Setup Nightwatch run: | - ddev npm init -y - ddev npm install nightwatch nightwatch-accessibility @lullabot/nightwatch-drupal-commands --save-dev echo "hooks:" >> .ddev/config.yaml echo " post-start:" >> .ddev/config.yaml echo " - exec: mysql -uroot -proot -hdb -e \"CREATE DATABASE IF NOT EXISTS firefox; GRANT ALL ON firefox.* TO 'db'@'%';\"" >> .ddev/config.yaml echo " - exec: mysql -uroot -proot -hdb -e \"CREATE DATABASE IF NOT EXISTS chrome; GRANT ALL ON chrome.* TO 'db'@'%';\"" >> .ddev/config.yaml ddev config --web-environment="NIGHTWATCH_DRUPAL_URL_FIREFOX=https://drupal_firefox,NIGHTWATCH_DRUPAL_URL_CHROME=https://drupal_chrome" ddev config --additional-hostnames="*.drainpipe" + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: test-functional-build + path: ${{ github.workspace }} + + Test-NPM: + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: test-functional-build + + - name: Start DDEV + run: ddev start + + - name: Setup Nightwatch + run: | + ddev npm init -y + ddev npm install nightwatch nightwatch-accessibility @lullabot/nightwatch-drupal-commands --save-dev ddev restart - name: Install Drupal