Skip to content

Commit 99b4e78

Browse files
committed
chore(e2e-tests): Add a pnpm-lock file to every e2e test folder
1 parent 8ffd1de commit 99b4e78

225 files changed

Lines changed: 458043 additions & 119 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,8 @@ jobs:
10151015
run: ${{ matrix.build-command || 'pnpm test:build' }}
10161016
env:
10171017
SENTRY_E2E_WORKSPACE_ROOT: ${{ github.workspace }}
1018+
# Use frozen lockfile for PRs (stability), fresh install for develop/master (catch issues)
1019+
npm_config_frozen_lockfile: ${{ github.event_name == 'pull_request' }}
10181020

10191021
- name: Install Playwright
10201022
uses: ./.github/actions/install-playwright
@@ -1139,6 +1141,9 @@ jobs:
11391141
working-directory: ${{ runner.temp }}/test-application
11401142
timeout-minutes: 7
11411143
run: ${{ matrix.build-command || 'pnpm test:build' }}
1144+
env:
1145+
# Use frozen lockfile for PRs (stability), fresh install for develop/master (catch issues)
1146+
npm_config_frozen_lockfile: ${{ github.event_name == 'pull_request' }}
11421147

11431148
- name: Install Playwright
11441149
uses: ./.github/actions/install-playwright
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'Release: Update E2E Lockfiles'
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
update-lockfiles:
9+
uses: ./.github/workflows/update-e2e-lockfiles.yml
10+
with:
11+
sentry_only: true
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: 'Update E2E Lockfiles'
2+
3+
on:
4+
schedule:
5+
# Run every day at midnight UTC
6+
- cron: '0 0 * * *'
7+
workflow_dispatch:
8+
inputs:
9+
sentry_only:
10+
description: 'Only update @sentry/* packages'
11+
type: boolean
12+
default: false
13+
workflow_call:
14+
inputs:
15+
sentry_only:
16+
description: 'Only update @sentry/* packages'
17+
type: boolean
18+
default: true
19+
20+
jobs:
21+
update-lockfiles:
22+
name: Update E2E Lockfiles
23+
runs-on: ubuntu-24.04
24+
timeout-minutes: 60
25+
permissions:
26+
pull-requests: write
27+
contents: write
28+
steps:
29+
- name: Check out develop branch
30+
uses: actions/checkout@v6
31+
with:
32+
ref: develop
33+
34+
- name: Set up Node
35+
uses: actions/setup-node@v6
36+
with:
37+
node-version-file: 'package.json'
38+
39+
- name: Set up pnpm
40+
uses: pnpm/action-setup@v4
41+
with:
42+
version: 9.15.9
43+
44+
- name: Install Dependencies
45+
uses: ./.github/actions/install-dependencies
46+
47+
- name: Build packages
48+
run: yarn build
49+
50+
- name: Build tarballs
51+
run: yarn build:tarball
52+
53+
- name: Get node version
54+
id: versions
55+
run: |
56+
echo "node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT
57+
58+
- name: Validate Verdaccio
59+
run: yarn test:validate
60+
working-directory: dev-packages/e2e-tests
61+
62+
- name: Prepare Verdaccio
63+
run: yarn test:prepare
64+
working-directory: dev-packages/e2e-tests
65+
env:
66+
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
67+
68+
- name: Update lockfiles
69+
run: |
70+
for dir in dev-packages/e2e-tests/test-applications/*/; do
71+
if [ -f "$dir/package.json" ]; then
72+
echo "Updating: $dir"
73+
if [ "${{ inputs.sentry_only }}" = "true" ]; then
74+
(cd "$dir" && pnpm update "@sentry/*" --ignore-scripts) || echo "Failed: $dir"
75+
else
76+
(cd "$dir" && pnpm install --no-frozen-lockfile --ignore-scripts) || echo "Failed: $dir"
77+
fi
78+
fi
79+
done
80+
81+
- name: Create Pull Request
82+
id: create-pr
83+
uses: peter-evans/create-pull-request@v7
84+
with:
85+
branch: chore/update-e2e-lockfiles
86+
delete-branch: true
87+
title: ${{ inputs.sentry_only && 'chore(e2e): Update @sentry/* in lockfiles' || 'chore(e2e): Update pnpm lockfiles' }}
88+
body: |
89+
${{ inputs.sentry_only && 'Automated update of `@sentry/*` packages in E2E test application lockfiles after release.' || 'Automated daily update of E2E test application lockfiles.' }}
90+
91+
This PR updates the `pnpm-lock.yaml` files in all E2E test applications.
92+
commit-message: ${{ inputs.sentry_only && 'chore(e2e): update @sentry/* in lockfiles' || 'chore(e2e): update pnpm lockfiles' }}
93+
labels: |
94+
CI & Build
95+
96+
- name: Enable squash automerge for PR
97+
if: steps.create-pr.outputs.pull-request-number != ''
98+
run: gh pr merge --squash --auto "${{ steps.create-pr.outputs.pull-request-number }}"
99+
env:
100+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
102+
- name: Auto approve PR
103+
if: steps.create-pr.outputs.pull-request-number != ''
104+
uses: hmarr/auto-approve-action@v4
105+
with:
106+
pull-request-number: ${{ steps.create-pr.outputs.pull-request-number }}
107+
review-message: 'Auto approved automated PR'

dev-packages/e2e-tests/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
tmp
33
.tmp_build_stdout
44
.tmp_build_stderr
5-
pnpm-lock.yaml
65
.last-run.json
6+
./pnpm-lock.yaml

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"ci:build-matrix": "ts-node ./lib/getTestMatrix.ts",
1818
"ci:build-matrix-optional": "ts-node ./lib/getTestMatrix.ts --optional=true",
1919
"ci:copy-to-temp": "ts-node ./ciCopyToTemp.ts",
20-
"clean:test-applications": "rimraf --glob test-applications/**/{node_modules,dist,build,.next,.nuxt,.sveltekit,.react-router,.astro,.output,pnpm-lock.yaml,.last-run.json,test-results,.angular,event-dumps}",
20+
"clean:test-applications": "rimraf --glob test-applications/**/{node_modules,dist,build,.next,.nuxt,.sveltekit,.react-router,.astro,.output,.last-run.json,test-results,.angular,event-dumps}",
2121
"clean:pnpm": "pnpm store prune"
2222
},
2323
"devDependencies": {

0 commit comments

Comments
 (0)