chore(deps): update dependency globals to ^15.13.0 (#2834) #9242
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 Preview.js end-to-end | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**" | |
- ".github/workflows/test-app-e2e.yaml" | |
- "!assets/**" | |
- "!integrations/**" | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- "**" | |
- ".github/workflows/test-app-e2e.yaml" | |
- "!assets/**" | |
- "!integrations/**" | |
jobs: | |
e2e-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [18.x] | |
os: [ubuntu-22.04, macos-14, windows-2022] | |
group: [1, 2, 3] | |
include: | |
- node-version: 20.x | |
os: ubuntu-22.04 | |
group: 1 | |
- node-version: 20.x | |
os: ubuntu-22.04 | |
group: 2 | |
- node-version: 20.x | |
os: ubuntu-22.04 | |
group: 3 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache pnpm modules | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-full-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-full- | |
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
with: | |
run_install: true | |
- run: cd testing && pnpm exec playwright install | |
- run: pnpm turbo build | |
- run: pnpm turbo e2e-test --concurrency=1 -- --shard=${{ matrix.group }}/3 --workers=2 | |
env: | |
PREVIEWJS_LOG_LEVEL: "debug" | |
- name: Update screenshots on non-main branches | |
run: | | |
git add . | |
if [[ $(git status --short) ]]; then | |
git status | |
echo "::set-env name=SCREENSHOTS_CHANGED::1" | |
git stash | |
git config user.name 'CI bot' | |
git config user.email '[email protected]' | |
git fetch | |
git checkout ${{ github.head_ref }} | |
git pull | |
git stash pop || echo "Conflict on git stash pop." | |
git commit --allow-empty -am "bot: update screenshots ($MATRIX_OS, group $MATRIX_GROUP)" | |
if ! git push origin ${{ github.head_ref }}; then | |
# Try again as it may be a race condition. | |
git pull --rebase | |
git push origin ${{ github.head_ref }} | |
fi | |
else | |
echo "No changes detected." | |
fi | |
if: ${{ github.ref != 'refs/heads/main' && matrix.node-version == '18.x' && matrix.os == 'ubuntu-22.04' }} | |
shell: bash | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" | |
MATRIX_OS: ${{ matrix.os }} | |
MATRIX_GROUP: ${{ matrix.group }} | |
- name: Fail if screenshots have changed on main branch | |
run: git diff --exit-code | |
if: ${{ github.ref == 'refs/heads/main' && matrix.node-version == '18.x' && matrix.os == 'ubuntu-22.04' }} |