Skip to content

ACMS-1979: To make starterkit script commands work with starterkit va… #1811

ACMS-1979: To make starterkit script commands work with starterkit va…

ACMS-1979: To make starterkit script commands work with starterkit va… #1811

Workflow file for this run

name: acquia-cms-starterkit CI
on:
schedule:
# "At minute 0 past hour 4 and 8 UTC."
- cron: '0 4,8 * * *'
push:
branches: [ develop, main, ACMS* ]
paths-ignore:
- README.md
pull_request:
branches: [ develop ]
paths-ignore:
- README.md
env:
ORCA_SUT_NAME: acquia/acquia-cms-starterkit
ORCA_SUT_BRANCH: develop
ORCA_VERSION: ^3
ORCA_PACKAGES_CONFIG_ALTER: ../acquia-cms-starterkit/tests/packages_alter.yml
ORCA_ENABLE_NIGHTWATCH: "FALSE"
DB_DATABASE: drupal
DB_USER: drupal
DB_PASSWORD: drupal
ORCA_PHPCS_STANDARD: AcquiaPHP
COMPOSER_PROCESS_TIMEOUT: 1800
jobs:
# @todo add tests to validate each starter-kit use case.
STATIC_CODE_ANALYSIS:
name: "Static Code Analysis"
runs-on: ubuntu-latest
env:
ORCA_JOB: STATIC_CODE_ANALYSIS
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: xdebug
- name: Download ORCA
run: composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
- name: Run GrumpPHP tests
run: |
composer install
./vendor/bin/grumphp run
- name: Before Install
run: ../orca/bin/ci/before_install.sh
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ../orca/bin/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ../orca/bin/ci/script.sh
- name: After script
run: |
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
VERIFY_ACMS_STARTERKIT_ON_DRUPAL_PROJECT:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
name: "Verify ${{ matrix.starter-kits }} with demo-content=${{ matrix.demo-content }}, content-model=${{ matrix.content-model }}, dam-integration=${{ matrix.dam-integration }}, gdpr-integration=${{ matrix.gdpr-integration }}, core-version=${{ matrix.core-version }} on acquia/drupal-recommended-project"
runs-on: ubuntu-latest
env:
demo-content: ${{ matrix.demo-content }}
content-model: ${{ matrix.content-model }}
dam-integration: ${{ matrix.dam-integration }}
connector-id: ${{ secrets.CONNECTOR_ID }}
gmaps-key: ${{ secrets.GMAPS_KEY }}
search-uuid: ${{ secrets.SEARCH_UUID }}
sitestudio-api-key: ${{ secrets.SITESTUDIO_API_KEY }}
sitestudio-org-key: ${{ secrets.SITESTUDIO_ORG_KEY }}
gdpr-integration: ${{ matrix.gdpr-integration }}
CI: TRUE
strategy:
matrix:
core-version: ["CURRENT", "LATEST_LTS"]
starter-kits: ["acquia_cms_enterprise_low_code", "acquia_cms_community", "acquia_cms_headless"]
demo-content: ["yes", "no"]
content-model: ["yes", "no"]
dam-integration: ["yes", "no"]
gdpr-integration: ["yes", "no"]
exclude:
- demo-content: "yes"
content-model: "yes"
- demo-content: "no"
content-model: "no"
dam-integration: "yes"
- demo-content: "yes"
content-model: "no"
dam-integration: "no"
- demo-content: "no"
content-model: "no"
gdpr-integration: "yes"
- demo-content: "yes"
content-model: "no"
gdpr-integration: "no"
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: xdebug
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -uroot -proot
mysql -e 'SHOW DATABASES;' -uroot -proot
mysql -e 'CREATE USER "drupal"@"localhost" IDENTIFIED BY "drupal";' -uroot -proot
mysql -e 'GRANT ALL PRIVILEGES ON *.* TO "drupal"@"localhost" WITH GRANT OPTION;' -uroot -proot
mysql -e 'FLUSH PRIVILEGES;' -uroot -proot
mysql -e 'SHOW GRANTS FOR "drupal"@"localhost";' -uroot -proot
- name: Download Composer Dependencies
run: composer install
- name: Download ORCA
run: |
cd ..
composer create-project --no-dev --ignore-platform-req=php acquia/orca orca "$ORCA_VERSION"
cd -
- name: Before Install
run: ../orca/bin/orca fixture:init --core=${{ matrix.core-version }} --sut=${ORCA_SUT_NAME} --profile=minimal --no-site-install --no-sqlite
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: |
cd ../orca-build
composer config -g github-oauth.github.com ${{ secrets.OAUTH_TOKEN }}
./vendor/bin/acms acms:install ${{ matrix.starter-kits }} --uri=${{ matrix.starter-kits }} --no-interaction
- name: Execute all PHPUnit tests
run: ./vendor/bin/phpunit
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ../orca/bin/ci/script.sh
- name: After script
run: |
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
VERIFY_ACMS_HEADLESS_WITH_NEXTJS:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
name: "Verify ACMS Headless and NextJs with core-version=${{ matrix.core-version }} on acquia/drupal-recommended-project"
runs-on: ubuntu-latest
env:
demo-content: "yes"
connector-id: ${{ secrets.CONNECTOR_ID }}
gmaps-key: ${{ secrets.GMAPS_KEY }}
search-uuid: ${{ secrets.SEARCH_UUID }}
nextjs-app: "yes"
nextjs-app-site-url: "http://localhost:3000"
nextjs-app-site-name: "Headless Site 1"
nextjs-app-env-file: ""
CI: TRUE
strategy:
matrix:
core-version: ["CURRENT", "LATEST_LTS"]
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: xdebug
- name: Setup NextJs Application
run: |
cd ..
npx create-next-app -e https://github.com/acquia/next-acms/tree/main/starters/basic-starter nextjs_app
cd nextjs_app
cp .env.example .env.local
nextjs_app_path=$(pwd)
echo "${nextjs_app_path}"
echo "nextjs_app_env_file=${nextjs_app_path}/.env.local" >> ${GITHUB_ENV}
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -uroot -proot
mysql -e 'SHOW DATABASES;' -uroot -proot
mysql -e 'CREATE USER "drupal"@"localhost" IDENTIFIED BY "drupal";' -uroot -proot
mysql -e 'GRANT ALL PRIVILEGES ON *.* TO "drupal"@"localhost" WITH GRANT OPTION;' -uroot -proot
mysql -e 'FLUSH PRIVILEGES;' -uroot -proot
mysql -e 'SHOW GRANTS FOR "drupal"@"localhost";' -uroot -proot
- name: Download Composer Dependencies
run: composer install
- name: Download ORCA
run: |
cd ..
composer create-project --no-dev --ignore-platform-req=php acquia/orca orca "$ORCA_VERSION"
cd -
- name: Before Install
run: ../orca/bin/orca fixture:init --core=${{ matrix.core-version }} --sut=${ORCA_SUT_NAME} --profile=minimal --no-site-install --no-sqlite
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: |
cd ../orca-build
composer config -g github-oauth.github.com ${{ secrets.OAUTH_TOKEN }}
./vendor/bin/acms acms:install acquia_cms_headless --no-interaction
- name: Execute all PHPUnit tests
run: ./vendor/bin/phpunit
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ../orca/bin/ci/script.sh
- name: After script
run: |
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
VERIFY_ACMS_INSTALL_CURRENT_PROJECT:
name: "Verify commands on current project (Non Drupal)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: xdebug
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -uroot -proot
mysql -e 'SHOW DATABASES;' -uroot -proot
mysql -e 'CREATE USER "drupal"@"localhost" IDENTIFIED BY "drupal";' -uroot -proot
mysql -e 'GRANT ALL PRIVILEGES ON *.* TO "drupal"@"localhost" WITH GRANT OPTION;' -uroot -proot
mysql -e 'FLUSH PRIVILEGES;' -uroot -proot
mysql -e 'SHOW GRANTS FOR "drupal"@"localhost";' -uroot -proot
- name: Download Composer Dependencies
run: composer install
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ./bin/acms acms:install --no-interaction
- name: Execute all PHPUnit tests
run: ./vendor/bin/phpunit