-
Notifications
You must be signed in to change notification settings - Fork 35
158 lines (157 loc) · 5.96 KB
/
acquia_cms_ci.workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: "Acquia CMS CI"
on:
push:
branches: [ develop, qa, stage, main, release/*, feature/* , 1.5.x, 2.x ]
paths-ignore:
- README.md
pull_request:
# branches: [ develop ]
paths-ignore:
- README.md
jobs:
static_code_analysis:
runs-on: ubuntu-24.04
env:
# Provide your package's name.
ORCA_SUT_NAME: acquia/acquia_cms
ORCA_SUT_BRANCH: 2.0.x
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 }}
GITHUB_EVENT: $ {{ github.event_name }}
JOB_TYPE: "static-code-analysis"
#ACMS_JOB: ${{ matrix.acms-job}}
strategy:
matrix:
orca-job:
- STATIC_CODE_ANALYSIS
- STRICT_DEPRECATED_CODE_SCAN
#php-version: [ "8.1" ]
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.3
#coverage: xdebug
- name: Download ORCA
run: |
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
- name: Before Install
run: ../orca/bin/ci/before_install.sh
- name: Install
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: |
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
integrated_tests:
name: ${{ matrix.acms_job }} (${{ matrix.orca-job }})
runs-on: ubuntu-24.04
env:
# Site test artifacts.
#ACMS_DB_ARTIFACT: "/home/runner/work/acquia_cms/acquia_cms/tests/acms.sql.gz"
#ACMS_FILES_ARTIFACT: "/home/runner/work/acquia_cms/acquia_cms/tests/acms-files.tar.gz"
#ACMS_STARTER_DB_ARTIFACT: "/home/runner/work/acquia_cms/acquia_cms/tests/acms-starter.sql.gz"
#ACMS_STARTER_FILES_ARTIFACT: "/home/runner/work/acquia_cms/acquia_cms/tests/acms-files-starter.tar.gz"
# Provide your package's name.
ORCA_SUT_NAME: acquia/acquia_cms
ORCA_SUT_BRANCH: 2.0.x
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 }}
#AWS_S3_BUCKET_PATH: s3://acquia-cms-artifacts/backstop
# Set Required API Keys.
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 }}
ACMS_JOB: ${{ matrix.acms_job }}
JOB_TYPE: "integrated-tests"
CI: true
strategy:
matrix:
orca-job:
- INTEGRATED_TEST_ON_LATEST_LTS
- ISOLATED_TEST_ON_CURRENT
#php-version: [ "8.1" ]
acms_job:
- integrated_php_unit_tests
- backstop_tests
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.3
#coverage: xdebug
- 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
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Before Install
run: |
#if [ "${ACMS_JOB}" = "starter" ] || [ "${ACMS_JOB}" = "starter_full" ] || [ "${ACMS_JOB}" = "base" ]; then aws s3 cp --recursive ${AWS_S3_BUCKET_PATH}/artifacts/ ${ORCA_SUT_DIR}/tests/; fi
../orca/bin/ci/before_install.sh
# Remove all existing_site phpunit tests from acquia_cms repo as those get's covered from integrated_existing_site_tests.
find tests/src -type f -name "*Test.php" -path "*/ExistingSite*/*" -exec rm -fr '{}' ';'
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
run: ./tests/ci/install.sh
- name: Before script
run: ../orca/bin/ci/before_script.sh
- name: Cleanup orca_public tests
shell: bash
run: |
source ../orca/bin/ci/_includes.sh
FILES=$(grep -nr "orca_public" ${ORCA_FIXTURE_DIR}/docroot/modules/contrib | sed 's/\:.*//')
echo "${FILES}" | while read -r FILE; do
rm ${FILE}
done
- 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