Uses matrix for shard number in Playwright tests

Uses the matrix context for the shard number in the Playwright test workflow.

This change ensures the correct shard number is used when running Playwright tests in parallel.
This commit is contained in:
maguire-arman 2025-07-15 10:00:29 -04:00
parent 7b396a62d1
commit 7240720572

View file

@ -158,8 +158,8 @@ jobs:
FILTER="$FILTER"
PLAYWRIGHT_PATH="${{ parameters.playwrightTestsPath }}"
SERVE_PATH="${{ parameters.npmServePath }}"
SHARD_NUMBER=$(shardNumber)
TOTAL_SHARDS=$(totalShards)
SHARD_NUMBER=${{ matrix.shardNumber }}
TOTAL_SHARDS=${{ parameters.totalShards }}
container_id=$(docker create \
--ipc=host \
--env-file "${{ parameters.envFileName }}" \
@ -174,8 +174,8 @@ jobs:
export FILTER="$FILTER"
export PLAYWRIGHT_PATH="${{ parameters.playwrightTestsPath }}"
export SERVE_PATH="${{ parameters.npmServePath }}"
export SHARD_NUMBER=$(shardNumber)
export TOTAL_SHARDS=$(totalShards)
export SHARD_NUMBER=${{ matrix.shardNumber }}
export TOTAL_SHARDS=${{ parameters.totalShards }}
container_id=$(docker create \
--ipc=host \
--env-file "${{ parameters.envFileName }}" \