diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index c38d86de3..5979b33ae 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -75,7 +75,7 @@ jobs: prepare-wasm: # seperate job on Ubuntu to build or fetch the wasm blob once on the fastest runner - runs-on: namespace-profile-ubuntu-8-cores + runs-on: runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64 needs: conditions steps: - uses: actions/checkout@v4 @@ -163,7 +163,7 @@ jobs: snapshots: name: playwright:snapshots:ubuntu - runs-on: namespace-profile-ubuntu-8-cores + runs-on: runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64 needs: [conditions, prepare-wasm] steps: - uses: actions/create-github-app-token@v1 @@ -237,19 +237,14 @@ jobs: - uses: actions/upload-artifact@v4 if: ${{ needs.conditions.outputs.should-run == 'true' && !cancelled() && (success() || failure()) }} with: - name: playwright-report-snapshots-${{ matrix.os }}-snapshot-${{ matrix.shardIndex }}-${{ github.sha }} + name: playwright-report-ubuntu-snapshot-${{ github.sha }} path: playwright-report/ include-hidden-files: true retention-days: 30 overwrite: true - - name: Clean up test-results - if: ${{ needs.conditions.outputs.should-run == 'true' && !cancelled() && (success() || failure()) }} - continue-on-error: true - run: rm -r test-results - - name: check for changes - if: ${{ needs.conditions.outputs.should-run == 'true' && matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 && github.ref != 'refs/heads/main' }} + if: ${{ needs.conditions.outputs.should-run == 'true' && github.ref != 'refs/heads/main' }} shell: bash id: git-check run: | @@ -270,31 +265,26 @@ jobs: git fetch origin echo ${{ github.head_ref }} git checkout ${{ github.head_ref }} - git commit -m "A snapshot a day keeps the bugs away! 📷🐛 (OS: ${{matrix.os}})" || true + git commit -m "A snapshot a day keeps the bugs away! 📷🐛" || true git push git push origin ${{ github.head_ref }} - # only upload artifacts if there's actually changes - - uses: actions/upload-artifact@v4 - if: ${{ needs.conditions.outputs.should-run == 'true' && steps.git-check.outputs.modified == 'true' }} - with: - name: playwright-report-ubuntu-${{ github.sha }} - path: playwright-report/ - include-hidden-files: true - retention-days: 30 - - electron: needs: [conditions, prepare-wasm] timeout-minutes: 60 - name: playwright:electron:${{ matrix.os }} ${{ matrix.shardIndex }} ${{ matrix.shardTotal }} + env: + OS_NAME: ${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || (contains(matrix.os, 'windows') && 'windows' || 'macos') }} + name: playwright:electron:${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || (contains(matrix.os, 'windows') && 'windows' || 'macos') }}:${{ matrix.shardIndex }}:${{ matrix.shardTotal }} strategy: fail-fast: false matrix: - # TODO: enable namespace-profile-windows-8-cores once available - os: [namespace-profile-ubuntu-8-cores, namespace-profile-macos-8-cores, windows-16-cores] - shardIndex: [1, 2, 3, 4, 5, 6, 7, 8] - shardTotal: [8] + # TODO: enable namespace-profile-windows-latest once available + os: + - "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64" + - namespace-profile-macos-8-cores + - windows-latest + shardIndex: [1, 2, 3, 4] + shardTotal: [4] # Disable macos and windows tests on hourly e2e tests since we only care # about server side changes. # Technique from https://github.com/joaomcteixeira/python-project-skeleton/pull/31/files @@ -303,7 +293,7 @@ jobs: exclude: - os: namespace-profile-macos-8-cores isScheduled: true - - os: windows-16-cores + - os: windows-latest isScheduled: true # TODO: add ref here for main and latest release tag runs-on: ${{ matrix.os }} @@ -361,7 +351,7 @@ jobs: if: ${{ needs.conditions.outputs.should-run == 'true' && !cancelled() && (success() || failure()) }} continue-on-error: true with: - name: test-results-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }} + name: test-results-${{ env.OS_NAME }}-${{ matrix.shardIndex }}-${{ github.sha }} path: test-results/ - name: Run playwright/electron flow (with retries) @@ -370,8 +360,8 @@ jobs: uses: nick-fields/retry@v3.0.2 with: shell: bash - command: .github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{matrix.os}} - timeout_minutes: 30 + command: .github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{ env.OS_NAME }} + timeout_minutes: 45 max_attempts: 15 env: CI: true @@ -384,7 +374,7 @@ jobs: - uses: actions/upload-artifact@v4 if: ${{ needs.conditions.outputs.should-run == 'true' && always() }} with: - name: test-results-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }} + name: test-results-${{ env.OS_NAME }}-${{ matrix.shardIndex }}-${{ github.sha }} path: test-results/ include-hidden-files: true retention-days: 30 @@ -393,7 +383,7 @@ jobs: - uses: actions/upload-artifact@v4 if: ${{ needs.conditions.outputs.should-run == 'true' && always() }} with: - name: playwright-report-${{ matrix.os }}-${{ matrix.shardIndex }}-${{ github.sha }} + name: playwright-report-${{ env.OS_NAME }}-${{ matrix.shardIndex }}-${{ github.sha }} path: playwright-report/ include-hidden-files: true retention-days: 30 diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png index ff033e42e..4e063079a 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png index 28ad318ef..70761c18d 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png index 30e22953a..1cd88dedd 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png index 896704145..0f2c2b913 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png index 550f7afc7..e6f5581df 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png index 8e8580f92..35a497669 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png index 74701101f..3ec8417e8 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png index cb212a0bb..c209d829d 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshots/prompt-to-edit/prompt-to-edit-snapshot-tests-spec-ts--edit-with-ai-example-snapshots--change-colour.snap.json b/e2e/playwright/snapshots/prompt-to-edit/prompt-to-edit-snapshot-tests-spec-ts--edit-with-ai-example-snapshots--change-colour.snap.json index 27757bd25..f4615f91c 100644 --- a/e2e/playwright/snapshots/prompt-to-edit/prompt-to-edit-snapshot-tests-spec-ts--edit-with-ai-example-snapshots--change-colour.snap.json +++ b/e2e/playwright/snapshots/prompt-to-edit/prompt-to-edit-snapshot-tests-spec-ts--edit-with-ai-example-snapshots--change-colour.snap.json @@ -29,5 +29,5 @@ } } ], - "kcl_version": "0.2.47" + "kcl_version": "0.2.50" } \ No newline at end of file diff --git a/playwright.electron.config.ts b/playwright.electron.config.ts index 8fcfb2570..19b2fc82b 100644 --- a/playwright.electron.config.ts +++ b/playwright.electron.config.ts @@ -1,4 +1,5 @@ import { defineConfig, devices } from '@playwright/test' +import { platform } from 'os' /** * See https://playwright.dev/docs/test-configuration. @@ -13,7 +14,7 @@ export default defineConfig({ /* Do not retry */ retries: 0, /* Different amount of parallelism on CI and local. */ - workers: 1, + workers: platform() === 'win32' ? 1 : 2, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ ['dot'],