Skip to content

Commit

Permalink
fix how functional tests are runned
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Apr 2, 2024
1 parent 0d2a329 commit b1a5db1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
jobs:
tests:
name: Tests

runs-on: ubuntu-latest

strategy:
Expand All @@ -22,7 +21,32 @@ jobs:
run: docker-compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal
- name: Run unit tests
run: docker-compose -f docker-compose.yml run -u www-data drupal phpunit --no-coverage --group=${{ matrix.module }} --exclude-group=${{ matrix.module }}_functional --configuration=/var/www/html/phpunit.xml

tests-functional:
name: Functional Tests
runs-on: ubuntu-latest

strategy:
matrix:
drupal_version: ['9.5', '10.0']
module: ['entity_to_text']

steps:
- uses: actions/checkout@v4
- run: docker-compose -f docker-compose.yml pull --include-deps drupal
- name: Build the docker-compose stack
run: docker-compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal
continue-on-error: ${{ matrix.experimental }}
- name: Up a persistent Docker Container
run: docker-compose -f docker-compose.yml up -d drupal
- name: wait on Docker to be ready, especially Apache that takes many seconds to be up
run: docker-compose exec -T drupal wait-for-it drupal:80 -t 60
- name: wait on Docker to be ready, especially MariaDB that takes many seconds to be up
run: docker-compose exec -T drupal wait-for-it db:3306 -t 60
- name: Bootstrap Drupal
run: docker-compose -f docker-compose.yml exec -T -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y
- name: Run tests
run: docker-compose -f docker-compose.yml exec -T -u www-data drupal phpunit --no-coverage --group=${{ matrix.module }}_functional --configuration=/var/www/html/phpunit.xml

upgrade-status:
name: Upgrade Status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* @group entity_to_text
* @group entity_to_text_tika
* @group entity_to_text_functional
* @group entity_to_text_tika_functional
*/
class InstallUninstallTest extends ModuleTestBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* @group entity_to_text
* @group entity_to_text_tika
* @group entity_to_text_functional
* @group entity_to_text_tika_functional
*/
class RequirementsTest extends BrowserTestBase {
Expand Down

0 comments on commit b1a5db1

Please sign in to comment.