Skip to content

Commit

Permalink
chore: another attempt at running tests
Browse files Browse the repository at this point in the history
Refs: OPS-10828
  • Loading branch information
orakili committed Sep 27, 2024
1 parent e7ecbb0 commit 44e7c7f
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Module Tests
name: Test
on: [pull_request]
env:
MYSQL_USER: root
Expand Down Expand Up @@ -46,21 +46,19 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Drupal core dependencies
- name: Install Drupal core and module dependencies
run: |
composer --no-interaction --no-progress --prefer-dist --optimize-autoloader install
- name: Install module dependencies
run: |
cd modules/custom/ocha_uimc
composer --no-interaction --no-progress --prefer-dist --optimize-autoloader install
cd ../../..
composer config repositories.module '{"type": "path", "url": "modules/custom/ocha_uimc", "options": {"symlink": false}}'
composer require unocha/ocha_uimc:@dev --no-interaction --no-progress --prefer-dist --optimize-autoloader
- name: Define DRUPAL_ROOT env variable
run: |
echo "DRUPAL_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Start MySQL service
- name: Install drush
run: composer require "drush/drush ^12.0"

- name: Start MySql service
run: |
sudo /etc/init.d/mysql start
Expand All @@ -73,17 +71,16 @@ jobs:
- name: Run module tests
run: |
vendor/bin/phpunit --bootstrap core/tests/bootstrap.php \
--configuration modules/custom/ocha_uimc/phpunit.xml \
--coverage-clover ./clover.xml \
modules/custom/ocha_uimc
-c modules/custom/ocha_uimc/phpunit.xml modules/custom/ocha_uimc
- name: Monitor coverage
id: coveralls
uses: slavcodev/coverage-monitor-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
status_context: Coverage (Drupal ${{ matrix.drupal-core }} - PHP ${{ matrix.php-versions }})
comment_context: Coverage (Drupal ${{ matrix.drupal-core }} - PHP ${{ matrix.php-versions }})
status_context: Monitor coverage for Drupal ${{ matrix.drupal-core }} - PHP ${{ matrix.php-versions }}
comment_context: Monitor coverage for Drupal ${{ matrix.drupal-core }} - PHP ${{ matrix.php-versions }}
coverage_path: "./clover.xml"
threshold_alert: 0
threshold_warning: 50
Expand Down

0 comments on commit 44e7c7f

Please sign in to comment.