Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
15b1d31
Fix README
gonzaloriestra Mar 13, 2026
b48b2c8
Baseline: slowest CI job is Unit tests Node 20 on Windows at 8.7m. Wi…
gonzaloriestra Mar 13, 2026
d06b934
Optimize CI: lighter reporter in CI + shard Windows tests 2-way
gonzaloriestra Mar 13, 2026
7ae62e2
Remove unnecessary build step from test-coverage job
gonzaloriestra Mar 13, 2026
a6c37e4
Restore build step for test-coverage (required)
gonzaloriestra Mar 13, 2026
c8bb998
Increase max threads for coverage run (6 vs 4), fix reporter format
gonzaloriestra Mar 13, 2026
e1d66f2
Remove build from test-coverage by using coverage.all=false
gonzaloriestra Mar 13, 2026
4699c04
Add generated files to gitignore
gonzaloriestra Mar 13, 2026
68d2bc3
Shard test coverage into 2 parallel jobs + merge step
gonzaloriestra Mar 13, 2026
cc2d8dc
Fix gitignore for blob reports
gonzaloriestra Mar 13, 2026
4d204fd
Fix coverage sharding: use non-hidden directory for blob reports
gonzaloriestra Mar 13, 2026
7c23c38
Clean up blob file
gonzaloriestra Mar 13, 2026
e10dc34
Shard coverage into 2 parallel jobs + merge. Coverage total wall cloc…
gonzaloriestra Mar 13, 2026
0b09fbe
Try 3-way Windows sharding to further reduce bottleneck
gonzaloriestra Mar 13, 2026
bd2f4b1
Revert "Try 3-way Windows sharding to further reduce bottleneck"
gonzaloriestra Mar 13, 2026
1408887
Fix coverage merge: use unique blob filenames per shard
gonzaloriestra Mar 13, 2026
da45127
Update autoresearch documentation with final results
gonzaloriestra Mar 13, 2026
6ced1a8
Move graphql-codegen check from macos to ubuntu (faster runner)
gonzaloriestra Mar 13, 2026
d544ba8
Revert graphql-codegen to macos-latest (required for platform-specifi…
gonzaloriestra Mar 13, 2026
fd5d812
Switch to basic reporter in CI for less output overhead
gonzaloriestra Mar 13, 2026
c3227a5
Remove ui-extensions-test-utils from vitest workspace (no tests)
gonzaloriestra Mar 13, 2026
95177c3
Try VITEST_MAX_THREADS=6 for CI (over-subscribe 4-core runners for I/…
gonzaloriestra Mar 13, 2026
5e1dff3
Revert MAX_THREADS to 4 (6 not faster)
gonzaloriestra Mar 13, 2026
4a9f8c7
Add --prefer-offline to pnpm install for faster CI setup
gonzaloriestra Mar 13, 2026
4bf4f4b
trigger CI
gonzaloriestra Mar 13, 2026
44fa43f
Trigger CI: --prefer-offline for pnpm install
gonzaloriestra Mar 13, 2026
953188c
Clean up workflow + --prefer-offline for faster pnpm install
gonzaloriestra Mar 13, 2026
8fb1ad8
Add ci optimization notes to trigger CI
gonzaloriestra Mar 13, 2026
313a869
Revert prefer-offline, clean up (debugging CI trigger)
gonzaloriestra Mar 13, 2026
370d7d3
Retry: trigger CI after delay
gonzaloriestra Mar 13, 2026
ccd3edf
Merge main + add --prefer-offline for faster pnpm install
gonzaloriestra Mar 13, 2026
437d926
Remove acceptance-tests job (removed upstream), fix package.json from…
gonzaloriestra Mar 13, 2026
758bf7a
Cache node_modules in CI to skip pnpm install on cache hit
gonzaloriestra Mar 13, 2026
aa3b892
Trigger CI (cache hit run for node_modules)
gonzaloriestra Mar 13, 2026
5278614
Revert node_modules caching (pnpm hard links break on cache restore)
gonzaloriestra Mar 13, 2026
9865e7f
Last step
gonzaloriestra Mar 13, 2026
da0a2e5
Update tests-pr.yml
gonzaloriestra Mar 13, 2026
49c9939
Remove temp files
gonzaloriestra Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/run-and-save-test-coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: "composite"
steps:
- name: Unit tests with coverage
run: pnpm vitest run --coverage --reporter json --outputFile ./coverage/report.json
run: pnpm vitest run --coverage --coverage.all=false --reporter=json --outputFile=./coverage/report.json
shell: bash
env:
VITEST_MIN_THREADS: "1"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-cli-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ runs:
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --prefer-offline
shell: bash
106 changes: 97 additions & 9 deletions .github/workflows/tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,45 @@ jobs:
run: 'test -z "$(git status --porcelain "docs-shopify.dev/generated/*.json" )" || { echo -e "Run (pnpm build-dev-docs) before pushing new commands or flags." ; exit 1; }'

unit-tests:
name: 'Unit tests with Node ${{ matrix.node }} in ${{ matrix.os }}'
name: "Unit tests with Node ${{ matrix.node }} in ${{ matrix.os }}${{ matrix.shard != '' && format(' (shard {0})', matrix.shard) || '' }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
node: [ '20.14.0', '22.2.0', '24.1.0' ]
shard: [ '' ]
include:
# Add sharding for Windows jobs to reduce wall-clock time
- os: windows-latest
node: '20.14.0'
shard: '1/2'
- os: windows-latest
node: '20.14.0'
shard: '2/2'
- os: windows-latest
node: '22.2.0'
shard: '1/2'
- os: windows-latest
node: '22.2.0'
shard: '2/2'
- os: windows-latest
node: '24.1.0'
shard: '1/2'
- os: windows-latest
node: '24.1.0'
shard: '2/2'
exclude:
# Exclude the non-sharded Windows entries (replaced by sharded ones above)
- os: windows-latest
node: '20.14.0'
shard: ''
- os: windows-latest
node: '22.2.0'
shard: ''
- os: windows-latest
node: '24.1.0'
shard: ''
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -165,16 +197,30 @@ jobs:
with:
node-version: ${{ matrix.node }}
- name: Unit tests
run: pnpm vitest run
run: pnpm vitest run ${{ matrix.shard && format('--shard {0}', matrix.shard) || '' }}
env:
VITEST_MIN_THREADS: "1"
VITEST_MAX_THREADS: "4"

test-coverage:
unit-tests-gate:
name: "Unit tests"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this, we will be able to replace this long list of required checks with a single one:
image.png

needs: unit-tests
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Verify all unit tests passed
if: needs.unit-tests.result != 'success'
run: exit 1

test-coverage-shard:
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
name: 'Test Coverage'
name: "Test Coverage (shard ${{ matrix.shard }})"
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
shard: ['1/2', '2/2']
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -185,12 +231,54 @@ jobs:
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Build
run: pnpm nx run-many --all --skip-nx-cache --target=build --output-style=stream
- name: Run and save test coverage
uses: ./.github/actions/run-and-save-test-coverage
- name: Unit tests with coverage (shard)
run: pnpm vitest run --coverage --coverage.all=false --reporter=blob --outputFile=vitest-blob-reports/blob-${{ matrix.shard == '1/2' && '1' || '2' }}.json --shard ${{ matrix.shard }}
env:
VITEST_MIN_THREADS: "1"
VITEST_MAX_THREADS: "4"
- uses: actions/upload-artifact@v4
with:
name: coverage-blob-${{ matrix.shard == '1/2' && '1' || '2' }}
path: vitest-blob-reports/
retention-days: 1

test-coverage-merge:
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
needs: test-coverage-shard
name: 'Test Coverage'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- uses: actions/download-artifact@v4
with:
pattern: coverage-blob-*
path: vitest-blob-reports
merge-multiple: true
- name: Merge coverage reports
run: pnpm vitest --mergeReports vitest-blob-reports --reporter=json --outputFile=./coverage/report.json --coverage --coverage.all=false
- name: Convert coverage to Jest
run: ./bin/save-coverage-file.js
- name: Take copy of report as new baseline for branch
run: cp ./report.json ./baseline-report.json
- name: Clean ref name
env:
SAFE_REF_NAME: "${{ github.head_ref }}"
run: |
SAFE_REF_NAME="${SAFE_REF_NAME//[\/.]/}"
echo "SAFE_REF_NAME=${SAFE_REF_NAME}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
branch-name: '${{ github.head_ref }}'
name: ${{ env.SAFE_REF_NAME }}--coverage-report
path: ./baseline-report.json
- name: Download and publish test coverage
uses: ./.github/actions/download-and-publish-test-coverage
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Learn more in the docs: [Create an app](https://shopify.dev/apps/getting-started

To work with themes, the CLI needs to be installed globally with:

- `npm install -g @shopify/cli @shopify/theme`
- `npm install -g @shopify/cli`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change, but this was outdated


You can also use do it through Homebrew on macOS: `brew tap shopify/shopify && brew install shopify-cli`

Expand Down
2 changes: 1 addition & 1 deletion configurations/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function config(packagePath: string, {poolStrategy}: ConfigOption
clearMocks: true,
mockReset: true, // Note: In Vitest 3.0, mockReset restores the original implementation
setupFiles: [path.join(__dirname, './vitest/setup.js')],
reporters: ['verbose', 'hanging-process'],
reporters: process.env.CI ? ['basic'] : ['verbose', 'hanging-process'],
pool: poolStrategy,
coverage: {
provider: 'istanbul',
Expand Down
3 changes: 1 addition & 2 deletions vitest.workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"packages/plugin-did-you-mean",
"packages/theme",
"packages/ui-extensions-dev-console",
"packages/ui-extensions-server-kit",
"packages/ui-extensions-test-utils"
"packages/ui-extensions-server-kit"
]
Loading