Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACMS-3442: Automation with modules development branch #1724

Merged
merged 11 commits into from
Jan 30, 2024
Merged
1 change: 1 addition & 0 deletions .github/workflows/acquia_cms_ci.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
# branches: [ develop ]
paths-ignore:
- README.md

jobs:
static_code_analysis:
if: ${{ github.event_name == 'pull_request' }}
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/acquia_cms_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,81 @@ jobs:
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh

dev_version_test:
if: ${{ github.event_name == 'pull_request' }}
name: ${{ matrix.acms_job }} (${{ matrix.orca-job }})
runs-on: ubuntu-latest
env:
ORCA_SUT_NAME: acquia/acquia_cms
ORCA_SUT_BRANCH: develop
ORCA_VERSION: ^4
ORCA_PACKAGES_CONFIG_ALTER: ../acquia_cms/tests/packages_alter.yml
ORCA_FIXTURE_PROJECT_TEMPLATE: acquia/drupal-recommended-project
ORCA_ENABLE_NIGHTWATCH: "FALSE"
ORCA_PHPCS_STANDARD: AcquiaPHP
ORCA_SUT_DIR: /home/runner/work/acquia_cms/acquia_cms
COMPOSER_PROCESS_TIMEOUT: 1800
ORCA_JOB: ${{ matrix.orca-job }}
CONNECTOR_ID: ${{ secrets.CONNECTOR_ID }}
SEARCH_UUID: ${{ secrets.SEARCH_UUID }}
CONNECTOR_KEY: ${{ secrets.CONNECTOR_KEY }}
GMAPS_KEY: ${{ secrets.GMAPS_KEY }}
SITESTUDIO_API_KEY: ${{ secrets.SITESTUDIO_API_KEY }}
SITESTUDIO_ORG_KEY: ${{ secrets.SITESTUDIO_ORG_KEY }}
ACMS_JOB: ${{ matrix.acms_job }}
JOB_TYPE: "integrated-tests"
CI: true
strategy:
fail-fast: false
matrix:
orca-job:
- ISOLATED_TEST_ON_CURRENT
acms_job:
- dev_version_test
steps:
- uses: actions/checkout@v3
- name: Use Node.js 12.13.1
uses: actions/setup-node@v3
with:
node-version: 12.13.1
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -uroot -proot < ./tests/ci/install.sql
- name: Download ORCA
run: |
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
curl https://gist.githubusercontent.com/vishalkhode1/0e26b2e9637722a256c74a6cb8496e9d/raw/sut-path-reposories.patch | git -C ../orca apply
- name: Before Install
run: |
# Update the CI by adding patches without pinning the following modules.
sed -i 's/"drupal\/moderation_dashboard": "^2.1"/"drupal\/moderation_dashboard": "^2.0"/' modules/acquia_cms_common/composer.json
sed -i 's/"drupal\/next": "^1.6"/"drupal\/next": "^1.0"/' modules/acquia_cms_headless/composer.json
sed -i 's/"drupal\/facets": "2.0.6"/"drupal\/moderation_dashboard": "^2.0.6"/' modules/acquia_cms_search/composer.json
sed -i 's/"drupal\/facets_pretty_paths": "1.5.0"/"drupal\/facets_pretty_paths": "^1.5.0"/' modules/acquia_cms_search/composer.json
sed -i 's/"drupal\/search_api": "1.30 || 1.31"/"drupal\/search_api": "^1.30"/' modules/acquia_cms_search/composer.json
sed -i '/"drupal\/facets_pretty_paths": {/,/},/d' modules/acquia_cms_search/composer.json
../orca/bin/ci/before_install.sh
chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 &
CHROMEDRIVER_PID=$!
echo "CHROMEDRIVER_PID=${CHROMEDRIVER_PID}" >> ${GITHUB_ENV}
- name: Install
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ./tests/ci/script.sh
- name: Before Cache
run : ../orca/bin/ci/before_cache.sh
- name: After script
run: |
kill -0 ${{ env.CHROMEDRIVER_PID }}
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions tests/ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ if [ -n "${ACMS_JOB}" ]; then
composer config --unset repositories.acquia_cms_common
composer require drupal/acquia_cms_common:2.x-dev -W
fi
if [ "${ACMS_JOB}" == "dev_version_test" ]; then
composer config extra.composer-exit-on-patch-failure "false" --json
composer config minimum-stability dev
composer config prefer-stable false
composer update "drupal/*"
composer update "drupal/moderation_dashboard:2.0.x-dev" "drupal/next:1.0.x-dev"
composer update "acquia/cohesion*" "drupal/core-*" "drupal/core" --prefer-stable
composer show
fi
./vendor/bin/acms site:install --yes --account-pass admin --uri=http://127.0.0.1:8080

# Enable Acquia CMS DAM module.
Expand Down
Loading