Skip to content

fix(deps): update dependency @faire/mjml-react to v3.5.4 #1116

fix(deps): update dependency @faire/mjml-react to v3.5.4

fix(deps): update dependency @faire/mjml-react to v3.5.4 #1116

name: 📦❓ Check test-project-esm fixture
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
permissions: {}
jobs:
check-test-project-esm-fixture:
# The only labeled or unlabeled event that should trigger this workflow is
# when the fixture-ok label is added or removed.
if: >-
github.repository == 'cedarjs/cedar' &&
(
(github.event.action != 'labeled' && github.event.action != 'unlabeled') ||
github.event.label.name == 'fixture-ok'
)
name: Check test-project-esm fixture
runs-on: ubuntu-latest
# Cancel in-progress runs of this workflow.
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up job (detect changes)
uses: ./.github/actions/set-up-job
with:
set-up-yarn-cache: false
yarn-install-directory: ./.github/actions/detect-changes
build: false
- name: 🔍 Detect changes
id: detect-changes
uses: ./.github/actions/detect-changes
- name: Set up job (fixture)
if: steps.detect-changes.outputs.code == 'true' && !contains(github.event.pull_request.labels.*.name, 'fixture-ok')
uses: ./.github/actions/set-up-job
- name: Rebuild test-project-esm fixture
if: steps.detect-changes.outputs.code == 'true' && !contains(github.event.pull_request.labels.*.name, 'fixture-ok')
run: |
# Temporarily disable errexit so we can capture the pipeline exit code
# produced by `yarn ... | tee ...` without the shell aborting the step
# before we can inspect the exit status.
set +e
# Exit early on errors and ensure we capture the full output for
# inspection.
set -o pipefail
# Run the rebuild and capture both stdout/stderr.
yarn rebuild-test-project-fixture --esm 2>&1 | tee rebuild-output.log
rc=${PIPESTATUS[0]}
# Re-enable errexit so subsequent checks fail fast.
set -e
# If the command itself exited non-zero, fail the step.
if [ ${rc} -ne 0 ]; then
echo "yarn rebuild-test-project-fixture --esm exited with code ${rc}"
exit ${rc}
fi
# Even if the command exited zero, search the output for failure
# indicators. Ideally this shouldn't be needed and the script would
# always return != 0 on failure, but I'm not sure it does. So this
# is an extra safety measure.
if grep -Eq "Failed |Error: Failed|ENOENT: no such file or directory" rebuild-output.log; then
echo "Detected failure text in rebuild-test-project-fixture --esm output"
exit 1
fi
# Ensure the script printed the expected success message.
# Again, this ideally shouldn't be needed.
if ! grep -Fq "Success! The test-project fixture has been rebuilt" rebuild-output.log; then
echo "Rebuild did not print success message"
exit 1
fi
rm rebuild-output.log
env:
REDWOOD_DISABLE_TELEMETRY: 1
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- name: Check for changed files
if: steps.detect-changes.outputs.code == 'true' && !contains(github.event.pull_request.labels.*.name, 'fixture-ok')
run: |
if [ $(git status --porcelain | wc -l) -eq 0 ]; then
exit 0
fi
# Fail fast on deleted or untracked files
if git status --porcelain | grep -qE '^ D |^\?\? '; then
: # fall through to failure output below
else
# Check if only package.json files are modified
non_package_json=$(git status --porcelain | grep '^ M ' | awk '{print $2}' | grep -v 'package\.json$' || true)
if [ -z "$non_package_json" ]; then
# Check if the only changes are to postcss, postcss-loader, or autoprefixer versions
remaining=$(git diff -- '*package.json' | grep -E '^[+-][^+-]' | grep -vE '^[+-]\s*"(postcss"|postcss-loader"|autoprefixer"):' || true)
if [ -z "$remaining" ]; then
echo 'Only allowed package version changes (postcss, postcss-loader, autoprefixer) detected. Ignoring.'
exit 0
fi
fi
fi
echo 'Updating the test project fixture caused files to change'
echo 'Please run `yarn rebuild-test-project-fixture --esm` locally and commit any changes'
echo
echo 'Deleted files:'
git status --porcelain | grep '^ D ' | awk '{print " " $2}'
echo
echo 'Modified files:'
git status --porcelain | grep '^ M ' | awk '{print " " $2}'
echo
echo 'Untracked files:'
git status --porcelain | grep '^?? ' | awk '{print " " $2}'
echo
echo
echo 'Full diff:'
git diff
exit 1