Skip to content

Add Drupal to community build #10050

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,26 @@ jobs:
uses: ./.github/actions/notify-slack
with:
token: ${{ secrets.ACTION_MONITORING_SLACK }}
- name: Test Drupal
if: always()
run: |
php -i|grep memory_limit
echo memory_limit=256M > /etc/php.d/drupal.ini
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done in setup, as it will leak into the next step anyway. Increasing the memory limit generally should be ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this change could go separate file which will be removed at the end of script?

git clone https://git.drupalcode.org/project/drupal.git drupal --depth=1
cd drupal
git rev-parse HEAD
php /usr/bin/composer install --no-progress --ignore-platform-reqs
export ASAN_OPTIONS=exitcode=139
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not your fault, but we could make ASAN_OPTIONS a global env var as it's always the same anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna file separate PR for that

export SIMPLETEST_BASE_URL=http://localhost:8888/
export SIMPLETEST_DB=sqlite://localhost/db/sqlite1
mkdir db
rm -f core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php
export DRUPAL_TYPES=Annotation,Assertion,ClassFinder,Drupal,Extension,File,Plugin,Render,tar,zip
php -dzend.assertions=1 vendor/bin/phpunit -c core/phpunit.xml.dist --testsuite unit,kernel --group $DRUPAL_TYPES || exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a point to adding assertions? I'm not against it, but we if we do we should do so for all projects. Generally, we're not interested in correct behavior, just crashes/memory violations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is that lots of tests require assertions to throw so php-unit can separate errors in data-providers

Copy link
Contributor Author

@andypost andypost Jun 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used to pick the most important test groups and database connectors, my next goal is to add a benchmark like WP and SF has

php -dzend.assertions=1 vendor/bin/phpunit -c core/phpunit.xml.dist --testsuite unit,kernel --group Database || exit 1
export SIMPLETEST_DB=mysql://root:root@localhost/test
php -dzend.assertions=1 vendor/bin/phpunit -c core/phpunit.xml.dist --testsuite unit,kernel --group Database || EXIT_CODE=1
[ ${EXIT_CODE:-0} -gt 128 ] && exit 1 || exit 0
OPCACHE_VARIATION:
needs: GENERATE_MATRIX
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
Expand Down