Added variable declations #2973
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
env: | |
COMPOSER_MEMORY_LIMIT: -1 | |
SIMPLETEST_DB: sqlite://tmp/site.sqlite | |
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080" | |
jobs: | |
build: | |
runs-on: 'ubuntu-20.04' | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.3'] | |
drupal-release: ['stable'] | |
composer-channel: ['stable'] | |
steps: | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJSON(matrix) }} | |
run: echo "$MATRIX_CONTEXT" | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: gd, pdo_sqlite, xdebug | |
- name: Update composer | |
run: composer --verbose self-update --${{ matrix.composer-channel }} | |
- name: Dump composer verson | |
run: composer --version | |
- name: Validate composer.json | |
run: composer --verbose validate | |
- name: Install dependencies | |
run: composer --verbose install | |
- run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite | |
- run: ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL & | |
- run: until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null | |
- name: Run a single unit test to verfiy the testing setup. | |
run: ./vendor/bin/phpunit -c ./public/core ./public/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php | |
- name: Run tests with phpunit/phpunit | |
run: ./vendor/bin/phpunit -c /home/runner/work/drupal-helfi-tyollisyyspalvelut-manuaali/drupal-helfi-tyollisyyspalvelut-manuaali/phpunit.github.xml --exclude-group service_manual_workflow_browser_test,exclude --coverage-clover=coverage.xml ./public/modules/custom | |
- run: ./vendor/bin/drush | |
- name: Run Custom module code standards. | |
run: ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --ignore=node_modules,bower_components,vendor --extensions=php,module,inc,install,test,profile,theme,info,yml ./public/modules/custom | |
- name: Check theme coding standards. | |
run: ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --ignore=node_modules,bower_components,vendor --extensions=php,module,inc,install,test,profile,theme,info,yml ./public/themes/custom | |
- name: Check security updates. | |
run: composer audit | |
- name: SonarQube Scan | |
if: ${{ env.SONAR_TOKEN }} | |
uses: SonarSource/sonarqube-scan-action@v4 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |