From 74b85eb39b1242a109da530c632d20ad0915052a Mon Sep 17 00:00:00 2001 From: William Candillon Date: Fri, 10 Jan 2025 08:33:54 +0100 Subject: [PATCH] =?UTF-8?q?chore(=F0=9F=90=99):=20run=20e2e=20tests=20on?= =?UTF-8?q?=20actual=20GPU=20(#2877)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-skia.yml | 2 +- .github/workflows/ci.yml | 20 +++++++++++++++---- .../src/renderer/__tests__/e2e/Text.spec.tsx | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-skia.yml b/.github/workflows/build-skia.yml index aabfeb3275..0c48b3e087 100644 --- a/.github/workflows/build-skia.yml +++ b/.github/workflows/build-skia.yml @@ -2,7 +2,7 @@ name: Build SKIA on: workflow_dispatch jobs: build: - runs-on: macos-latest-large + runs-on: macos-latest-xlarge steps: - name: checkout uses: actions/checkout@v3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78bff39b54..25dcf9cbc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -204,7 +204,7 @@ jobs: - name: Build example for Android env: - JAVA_OPTS: "-XX:MaxHeapSize=6g" + JAVA_OPTS: "-XX:MaxHeapSize=16g" run: | yarn turbo run build:android --concurrency 1 --force @@ -299,7 +299,7 @@ jobs: name: tests-docs-screenshots build-ios: - runs-on: macos-latest-large + runs-on: macos-latest-xlarge env: TURBO_CACHE_DIR: .turbo/ios steps: @@ -329,6 +329,18 @@ jobs: echo "turbo_cache_hit=1" >> $GITHUB_ENV fi + - name: Install CocoaPods + working-directory: apps/paper/ios + run: pod install + + - name: Start Package Manager + working-directory: apps/paper + run: E2E=true yarn start & + - name: Build example for iOS - run: | - yarn turbo run build:ios --concurrency 1 --force \ No newline at end of file + working-directory: apps/paper + run: yarn ios --simulator 'iPhone 16 Pro' + + - name: Run e2e tests + working-directory: packages/skia + run: CI=true yarn e2e \ No newline at end of file diff --git a/packages/skia/src/renderer/__tests__/e2e/Text.spec.tsx b/packages/skia/src/renderer/__tests__/e2e/Text.spec.tsx index 523a4c47b6..4bb9fbe0d9 100644 --- a/packages/skia/src/renderer/__tests__/e2e/Text.spec.tsx +++ b/packages/skia/src/renderer/__tests__/e2e/Text.spec.tsx @@ -18,7 +18,7 @@ describe("Text", () => { }, { font } ); - expect(result).toEqual([892, 896]); + expect(result).toEqual(surface.OS === "ios" ? [0, 0] : [892, 896]); }); it("Should calculate chinese text width correctly", async () => { const font = fonts.NotoSansSCRegular;