File tree Expand file tree Collapse file tree
apps/code/tests/e2e/fixtures Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 matrix :
1717 include :
1818 - arch : arm64
19- runner : macos-15-arm64
19+ runner : macos-15
2020 - arch : x64
2121 runner : macos-15-intel
2222 runs-on : ${{ matrix.runner }}
@@ -134,11 +134,34 @@ jobs:
134134 - name : Build native modules
135135 run : pnpm --filter code run build-native
136136
137- - name : Publish with Electron Forge
137+ - name : Build release artifacts
138+ env :
139+ APP_VERSION : ${{ steps.version.outputs.version }}
140+ GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
141+ run : pnpm --filter code exec electron-forge publish --dry-run --arch=${{ matrix.arch }} --platform=darwin
142+
143+ - name : Install Playwright
144+ run : pnpm --filter code exec playwright install
145+
146+ - name : Smoke test packaged app
147+ env :
148+ CI : true
149+ E2E_APP_ARCH : ${{ matrix.arch }}
150+ run : pnpm --filter code exec playwright test --config=tests/e2e/playwright.config.ts tests/e2e/tests/smoke.spec.ts
151+
152+ - name : Upload Playwright report
153+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
154+ if : failure()
155+ with :
156+ name : release-playwright-report-macos-${{ matrix.arch }}
157+ path : apps/code/playwright-report/
158+ retention-days : 7
159+
160+ - name : Publish release artifacts
138161 env :
139162 APP_VERSION : ${{ steps.version.outputs.version }}
140163 GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
141- run : pnpm --filter code exec electron-forge publish --arch=${{ matrix.arch }} --platform=darwin
164+ run : pnpm --filter code exec electron-forge publish --from-dry-run
142165
143166 publish-windows :
144167 runs-on : windows-latest
Original file line number Diff line number Diff line change 99
1010function getAppPath ( ) : string {
1111 const outDir = path . join ( __dirname , "../../../out" ) ;
12+ const requestedArch = process . env . E2E_APP_ARCH ;
1213
1314 if ( process . platform === "darwin" ) {
1415 const arm64Path = path . join (
@@ -20,6 +21,16 @@ function getAppPath(): string {
2021 "PostHog Code-darwin-x64/PostHog Code.app/Contents/MacOS/PostHog Code" ,
2122 ) ;
2223
24+ if ( requestedArch === "arm64" ) {
25+ if ( existsSync ( arm64Path ) ) return arm64Path ;
26+ throw new Error ( `No darwin-arm64 packaged app found at ${ arm64Path } .` ) ;
27+ }
28+
29+ if ( requestedArch === "x64" ) {
30+ if ( existsSync ( x64Path ) ) return x64Path ;
31+ throw new Error ( `No darwin-x64 packaged app found at ${ x64Path } .` ) ;
32+ }
33+
2334 if ( existsSync ( arm64Path ) ) return arm64Path ;
2435 if ( existsSync ( x64Path ) ) return x64Path ;
2536
You can’t perform that action at this time.
0 commit comments