Skip to content

Bump drupal/social_media_links from 2.9.0 to 2.10.0 #7868

Bump drupal/social_media_links from 2.9.0 to 2.10.0

Bump drupal/social_media_links from 2.9.0 to 2.10.0 #7868

name: Continuous Integration
on: [pull_request]
permissions:
pull-requests: write
issues: write
jobs:
# Check whether certain fields exist in the CMS configuration.
check-fields:
name: Check Fields
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Check Corresponding Entity Reference Fields
# See also `composer va:test:check-cer` in composer.json
run: ./tests/scripts/check-cer.sh
- name: Check Revision Log fields
# See also `composer va:test:check-node-revision-logs` in composer.json
# See also `composer va:test:check-taxonomy-revision-logs` in composer.json
run: |
./tests/scripts/check-node-revision-logs.sh
./tests/scripts/check-taxonomy-revision-logs.sh
# Validate that the `composer.lock` hash is up-to-date.
composer-validate:
name: Composer Validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Composer Validate
run: composer validate
# Check style of ES/JS files with ESLint and ReviewDog.
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Post-Checkout Actions
uses: ./.github/actions/post-checkout
- name: ReviewDog
# See also `composer va:test:eslint` in composer.json
uses: reviewdog/action-eslint@beb7a743eeb10db90a8529b5bc4031be52e90868 # v1.31.0
with:
reporter: github-pr-review
eslint_flags: '--max-warnings 0 -c .eslintrc.json --no-eslintrc docroot/modules/custom/**/*.es6.js docroot/themes/custom/**/*.es6.js tests/cypress/**/*.js'
fail_on_error: true
# Check for common PHP code smells with PHP_CodeSniffer.
php_codesniffer:
name: PHP_CodeSniffer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Post-Checkout Actions
uses: ./.github/actions/post-checkout
- name: Run PHP_CodeSniffer and ReviewDog
# See also `composer va:test:php_codesniffer` in composer.json
run: |
export REVIEWDOG_GITHUB_API_TOKEN="${GITHUB_TOKEN}"
bin/phpcs \
--report="checkstyle" \
-q \
| reviewdog \
-name="PHP_CodeSniffer" \
-f=checkstyle \
-reporter=github-pr-review \
-diff='git diff'
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Lint with PHP's built-in linting.
php_lint:
name: PHP Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Post-Checkout Actions
uses: ./.github/actions/post-checkout
- name: Run PHPLint
# See also `composer va:test:lint-php` in composer.json
run: ./tests/scripts/lint-php.sh
# Analyze the codebase for programming errors with PHPStan.
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Post-Checkout Actions
uses: ./.github/actions/post-checkout
- name: Run PHPStan and ReviewDog
# See also `composer va:test:phpstan` in composer.json
run: |
bin/phpstan analyze \
--no-progress \
--no-interaction \
--error-format=raw \
--memory-limit=1G \
| reviewdog \
-name="PHPStan" \
-f=phpstan \
-reporter=github-pr-review \
-fail-on-error=true \
-diff='git diff' \
-tee
env:
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Run unit tests against codebase with PHPUnit.
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Post-Checkout Actions
uses: ./.github/actions/post-checkout
- name: Run PHPUnit (Unit Tests only)
# See also `composer va:test:phpunit-unit` in composer.json
run: bin/phpunit \
--group unit \
--exclude-group disabled \
--coverage-text \
tests/phpunit
# Check styles of modules and themes with Stylelint.
stylelint:
name: Stylelint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Stylelint modules
# See also `composer va:test:stylelint-modules` in composer.json
uses: reviewdog/action-stylelint@9e1a9917f7d97c360463cd5d922385f84b9cc3a0 # v1.28.0
with:
fail_on_error: true
github_token: ${{ secrets.github_token }}
packages: 'stylelint-config-sass-guidelines stylelint-order'
reporter: github-pr-review
stylelint_config: '.stylelintrc'
stylelint_input: 'docroot/modules/custom/**/*.css'
- name: Stylelint themes
# See also `composer va:test:stylelint-themes` in composer.json
uses: reviewdog/action-stylelint@9e1a9917f7d97c360463cd5d922385f84b9cc3a0 # v1.28.0
with:
fail_on_error: true
github_token: ${{ secrets.github_token }}
packages: 'stylelint-config-sass-guidelines stylelint-order'
reporter: github-pr-review
stylelint_config: '.stylelintrc'
stylelint_input: 'docroot/themes/custom/**/*.scss'
# Warn strongly if the `composer.lock` lines changed exceed a threshold.
check-composer-lock-changes:
name: Check composer.lock changes
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Delete any existing comment.
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
continue-on-error: true
with:
comment_tag: check-composer-lock-changes
mode: delete
message: |
Checking composer.lock changes...
- name: Check changes in composer.lock.
run: |
LINES_CHANGED=$(git diff --numstat origin/main..HEAD -- composer.lock | awk '{print $1+$2}')
THRESHOLD=200
>&2 echo "LINES CHANGED=$LINES_CHANGED"
>&2 echo "THRESHOLD=$THRESHOLD"
echo "LINES_CHANGED=$LINES_CHANGED" >> $GITHUB_ENV
echo "THRESHOLD=$THRESHOLD" >> $GITHUB_ENV
- name: Comment if composer.lock changes exceed threshold.
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
if: env.LINES_CHANGED > env.THRESHOLD
continue-on-error: true
with:
comment_tag: check-composer-lock-changes
message: |
The number of lines changed in composer.lock exceeds the acceptable threshold.
- Lines changed: ${{ env.LINES_CHANGED }}
- Threshold: ${{ env.THRESHOLD }}
This is a warning only. Please review the changes and ensure that they are acceptable.