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

Conversation

andypost
Copy link
Contributor

@andypost andypost commented Dec 5, 2022

Closes #9992

  • running unit and kernel tests for groups: Annotation,Assertion,ClassFinder,Drupal,Extension,File,Plugin,Render,tar,zip
  • the Database group of unit and kernel tests using sqlite and mysql
  • taking around ~10 minutes

@andypost andypost force-pushed the 9992-drupal branch 2 times, most recently from 63d9a29 to 1ecbb16 Compare December 5, 2022 10:57
@andypost
Copy link
Contributor Author

andypost commented Dec 5, 2022

Looks to run kernel tests it needs SIMPLETEST_BASE_URL env variable and webserver (could use build-in one)

@andypost
Copy link
Contributor Author

andypost commented Dec 5, 2022

debugging on unit and build tests as they are fast, as all databases available using to test sqlite/mysql/pgsql connections

sqlite
Tests: 19452, Assertions: 34554, Failures: 4, Skipped: 2585, Incomplete: 3.
mysql
Tests: 19452, Assertions: 34545, Errors: 2, Failures: 4, Skipped: 2585, Incomplete: 3.
pgsql
Tests: 19452, Assertions: 34551, Failures: 4, Skipped: 2585, Incomplete: 3.

-d opcache.jit_buffer_size=16M
- name: Verify generated files are up to date
uses: ./.github/actions/verify-generated-files
- name: Test Drupal
Copy link
Member

Choose a reason for hiding this comment

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

You should move this to a new job for testing analogous to #9942. The binary needs to be built with the sanitize flags for this to be meaningful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes,I will

ATM trying to connect to pgsql but it looks broken

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Or just use the existing mysql db if you can.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Somehow pgsql connection has issues, I limited tests to sqlite and mysql now

@andypost andypost force-pushed the 9992-drupal branch 11 times, most recently from bcf45df to a60b38d Compare December 7, 2022 18:20
@andypost andypost force-pushed the 9992-drupal branch 12 times, most recently from dc76130 to 1bc2eba Compare June 27, 2023 23:28
@andypost andypost marked this pull request as ready for review June 27, 2023 23:30
@andypost andypost requested a review from TimWolla as a code owner June 27, 2023 23:30
@TimWolla TimWolla removed their request for review June 28, 2023 07:58
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Thank you @andypost! A few comments. Can you also copy this to nightly to show that this will succeed? I will remove it when merging. 🙂

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?

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

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

run kernel and unit tests for pdo_sqlite and pdo_mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider adding Drupal to community build
2 participants