Skip to content

Commit

Permalink
Merge branch 'City-of-Helsinki:main' into fix-to-allow-multiple-clients
Browse files Browse the repository at this point in the history
  • Loading branch information
jiisuominen authored Jan 11, 2023
2 parents f8dad48 + 170da92 commit a78b455
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
on: [push]
on:
pull_request:
push:
branches:
- main
name: CI
env:
SIMPLETEST_DB: "mysql://drupal:drupal@db:3306/drupal"
SIMPLETEST_BASE_URL: "http://127.0.0.1:8888"
DRUPAL_CORE_VERSION: 9.3.x
DRUPAL_CORE_VERSION: 9.5.x
SYMFONY_DEPRECATIONS_HELPER: disabled
BROWSERTEST_OUTPUT_DIRECTORY: 'sites/simpletest'
OPTIONAL_DEPENDENCIES: drupal/helfi_tunnistamo drupal/redirect
Expand Down Expand Up @@ -32,11 +36,14 @@ jobs:
with:
fetch-depth: 1

- name: Parse $MODULE_NAME from composer.json
run: echo "MODULE_NAME=$(cat composer.json | jq -r .name | awk -F/ '{print $NF}')" >> $GITHUB_ENV

- name: Set Drupal root
run: echo "DRUPAL_ROOT=$HOME/drupal" >> $GITHUB_ENV

- name: Set module folder
run: echo "MODULE_FOLDER=$DRUPAL_ROOT/modules/contrib/${{ secrets.MODULE_NAME }}" >> $GITHUB_ENV
run: echo "MODULE_FOLDER=$DRUPAL_ROOT/modules/contrib/$MODULE_NAME" >> $GITHUB_ENV

- name: Clone drupal
run: git clone --depth 1 --branch "$DRUPAL_CORE_VERSION" http://git.drupal.org/project/drupal.git/ $DRUPAL_ROOT
Expand All @@ -47,9 +54,9 @@ jobs:
composer config platform.php ${{ matrix.php-versions }}
composer config repositories.4 composer https://repository.drupal.hel.ninja/
composer config repositories.5 path $GITHUB_WORKSPACE
composer require drupal/${{ secrets.MODULE_NAME }} -W
composer require drupal/$MODULE_NAME -W
composer run-script drupal-phpunit-upgrade
composer require "drush/drush ^10.0"
composer require "drush/drush ^11.0"
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev donatj/mock-webserver
composer require --dev "drupal/coder"
Expand All @@ -60,7 +67,7 @@ jobs:
run: |
cd $DRUPAL_ROOT
php -d sendmail_path=$(which true); vendor/bin/drush --yes -v site-install minimal --db-url="$SIMPLETEST_DB"
vendor/bin/drush en ${{ secrets.MODULE_NAME }} -y
vendor/bin/drush en $MODULE_NAME -y
- name: Run PHPCS
run: |
Expand All @@ -86,7 +93,7 @@ jobs:
- name: Create an artifact from test report
uses: actions/upload-artifact@v2
if: failure()
if: always()
with:
name: results
path: |
Expand Down

0 comments on commit a78b455

Please sign in to comment.