chore(deps): update all-major (major) #4596
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: Test | |
on: | |
- pull_request | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Commons | |
uses: ./.github/actions/commons | |
- name: Install dependencies | |
run: pnpm i | |
- name: Check formatting | |
run: pnpm test:format | |
- name: Build packages | |
run: pnpm build | |
- name: Run static tests | |
if: startsWith(github.head_ref, 'test-all/') == false | |
run: pnpm test:static | |
- name: Run all static tests | |
if: startsWith(github.head_ref, 'test-all/') == true | |
run: pnpm test:static:all | |
- name: Run unit tests | |
if: startsWith(github.head_ref, 'test-all/') == false | |
run: pnpm test:unit | |
- name: Run all unit tests | |
if: startsWith(github.head_ref, 'test-all/') == true | |
run: pnpm test:unit:all | |
- name: Run integration tests | |
if: startsWith(github.head_ref, 'test-all/') == false | |
run: pnpm test:integration | |
- name: Run all integration tests | |
if: startsWith(github.head_ref, 'test-all/') == true | |
run: pnpm test:integration:all | |
- name: Upload Playwright report | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: playwright-report | |
path: | | |
packages/**/playwright-report/** | |
packages/**/test-results/** | |
retention-days: 3 | |
- name: Gatsby log | |
run: cat /tmp/gatsby.log || true | |
if: always() | |
- name: Drupal log | |
run: cat /tmp/drupal.log || true | |
if: always() | |
- name: Check for uncommitted changes | |
run: | | |
if [[ $(git status --porcelain) ]] | |
then | |
>&2 echo "Error: Found uncommitted changes. Lerna publish will fail." | |
git status --porcelain | |
git diff | |
false | |
else | |
echo "Success: Found no uncommitted changes" | |
fi | |
drupal_updates: | |
if: startsWith(github.head_ref, 'test-all/') == true | |
name: Check for forgotten config changes | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout BASE | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.base.ref }} | |
- name: Commons | |
uses: ./.github/actions/commons | |
- name: Install dependencies | |
run: pnpm i | |
- name: Build packages | |
run: pnpm build | |
- name: Checkout HEAD | |
run: git checkout ${{ github.event.pull_request.head.ref }} | |
- name: Check if there are config changes after Drupal updates | |
run: | | |
set -e | |
cd apps/silverback-drupal | |
set -x | |
# Delete vendor dir to avoid potential issues with `composer install`. | |
rm -rf vendor | |
composer install | |
output=$(pnpm drush -y updb --cache-clear=0 2>&1) | |
if echo $output | grep -q 'No pending updates' | |
then | |
echo "No drupal updates found." | |
exit 0 | |
fi | |
pnpm drush -y cr | |
pnpm drush -y cex | |
cd - | |
# Check Git changes ignoring the config translations. | |
if [[ $(git status --porcelain -- apps/silverback-drupal/config ':!apps/silverback-drupal/config/sync/language') ]] | |
then | |
set +x | |
>&2 echo '⬇️ ⬇️ ⬇️ ⬇️ ⬇️️' | |
>&2 echo 'WARNING: Found uncommitted Drupal config changes after applying Drupal database updates.' | |
>&2 echo '' | |
>&2 echo 'If this check failed due to a Drupal database update which changed the Drupal config:' | |
>&2 echo ' - Checkout this branch locally' | |
>&2 echo ' - Switch to Drupal directory' | |
>&2 echo ' - Run `composer i && pnpm silverback setup --no-config-import && pnpm drush cex -y`' | |
>&2 echo ' - Review the config changes' | |
>&2 echo ' - Commit and push' | |
>&2 echo '' | |
>&2 echo 'Also, you can ignore this failure if you are really sure that everything is all right.' | |
>&2 echo '⬇️ ⬇️ ⬇️ ⬇️ ⬇️️️️' | |
set -x | |
git status --porcelain -- apps/silverback-drupal/config ':!apps/silverback-drupal/config/sync/language' | |
git diff -- apps/silverback-drupal/config ':!apps/silverback-drupal/config/sync/language' | |
false | |
else | |
echo 'Success: Found no new config changes.' | |
fi |