Skip to content

Refuse content that provably belongs to another domain. #738

Refuse content that provably belongs to another domain.

Refuse content that provably belongs to another domain. #738

Workflow file for this run

name: Test and code coverage
on:
- push
jobs:
lint:
runs-on: ubuntu-latest
container: quantcdn/drupal-ci:11.1.x-dev
steps:
- uses: actions/checkout@v4
- name: Lint
run: phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,yml .
phpunit:
runs-on: ubuntu-latest
container: quantcdn/drupal-ci:11.1.x-dev
services:
mariadb:
image: mariadb:10.11
ports:
- 3306:3306
env:
MYSQL_DATABASE: drupal11
MYSQL_ROOT_PASSWORD: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=30
steps:
- name: Install Drupal
run: drush si --db-url=mysql://root:drupal@mariadb:3306/drupal11 -y
working-directory: /var/www/drupal
# token is required by quant_search. purge is required by quant_purger,
# whose kernel tests install it, so the suite cannot run without it.
- name: Install module dependencies
run: composer --no-interaction --no-progress require drupal/token drupal/purge
working-directory: /var/www/drupal
# The image ships phpunit globally, but its bootstrap needs the test
# dependencies that core-dev pulls in.
- name: Install test dependencies
run: composer --no-interaction --no-progress require --dev -W drupal/core-dev:^11
working-directory: /var/www/drupal
- name: Set up custom module
run: mkdir -p /var/www/drupal/web/modules/custom/quant
- uses: actions/checkout@v4
with:
path: quant
- name: Move the module
run: mv ./quant /var/www/drupal/web/modules/custom
- name: Enable quant
run: drush en quant -y
working-directory: /var/www/drupal
- name: Prepare test output directory
run: mkdir -p /var/www/drupal/web/sites/simpletest/browser_output
working-directory: /var/www/drupal
# Runs every unit and kernel test in the module and its submodules.
# Previously this job installed the module and stopped, so a broken
# test file went unnoticed.
- name: Run tests
env:
SIMPLETEST_DB: mysql://root:drupal@mariadb:3306/drupal11
BROWSERTEST_OUTPUT_DIRECTORY: /var/www/drupal/web/sites/simpletest/browser_output
run: vendor/bin/phpunit -c web/core --display-deprecations web/modules/custom/quant
working-directory: /var/www/drupal