Compare commits
No commits in common. "main" and "esb-deploy-v1" have entirely different histories.
main
...
esb-deploy
3 changed files with 4 additions and 55 deletions
|
|
@ -94,7 +94,6 @@ runs:
|
||||||
env:
|
env:
|
||||||
VERIFY_GOALS: ${{ inputs.verify-goals }}
|
VERIFY_GOALS: ${{ inputs.verify-goals }}
|
||||||
EXTRA_ARGS: ${{ inputs.extra-args }}
|
EXTRA_ARGS: ${{ inputs.extra-args }}
|
||||||
MAVEN_PROFILE: ${{ inputs.maven-profile }}
|
|
||||||
run: |
|
run: |
|
||||||
mvn --batch-mode $VERIFY_GOALS \
|
mvn --batch-mode $VERIFY_GOALS \
|
||||||
-s /tmp/maven-settings.xml \
|
-s /tmp/maven-settings.xml \
|
||||||
|
|
|
||||||
|
|
@ -12,47 +12,18 @@ Run Playwright E2E tests for one shard and upload the blob report as an artifact
|
||||||
| `jfrog-token` | No | `""` | JFrog npm auth token |
|
| `jfrog-token` | No | `""` | JFrog npm auth token |
|
||||||
| `shard-index` | No | `1` | Current shard index (1-based). Set to `1` when not sharding. |
|
| `shard-index` | No | `1` | Current shard index (1-based). Set to `1` when not sharding. |
|
||||||
| `shard-total` | No | `1` | Total number of shards. Set to `1` to disable sharding. |
|
| `shard-total` | No | `1` | Total number of shards. Set to `1` to disable sharding. |
|
||||||
| `no-deps` | No | `false` | Skip dependencies between Playwright projects (e.g. setup/teardown). Passes `--no-deps` to Playwright. |
|
|
||||||
| `projects` | No | `""` | Comma-separated list of Playwright projects to run (e.g. `chromium,firefox,Mobile Chrome`). Leave empty to use the Playwright default. |
|
|
||||||
| `artifact-retention-days` | No | `3` | Number of days to retain the blob report artifact |
|
| `artifact-retention-days` | No | `3` | Number of days to retain the blob report artifact |
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Basic
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/playwright-run@playwright-run-v1
|
- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/playwright-run@playwright-run-v1
|
||||||
with:
|
with:
|
||||||
working-directory: e2e
|
working-directory: frontend
|
||||||
node-version: 22
|
node-version: 22
|
||||||
jfrog-token: ${{ secrets.JFROG_TOKEN }}
|
jfrog-token: ${{ secrets.JFROG_TOKEN }}
|
||||||
```
|
shard-index: ${{ matrix.shard-index }}
|
||||||
|
shard-total: 5
|
||||||
### Sharded
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Test Shard ${{ matrix.shard-index }}/${{ matrix.total }}"
|
|
||||||
# Define the matrix strategy on the parent job:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
total: [5] # The same for all instances
|
|
||||||
shard-index: [1, 2, 3, 4, 5]
|
|
||||||
steps:
|
|
||||||
# ...other steps like checkout repo etc.
|
|
||||||
- name: Run tests
|
|
||||||
uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/playwright-run@playwright-run-v1
|
|
||||||
with:
|
|
||||||
working-directory: frontend
|
|
||||||
node-version: 22
|
|
||||||
jfrog-token: ${{ secrets.JFROG_TOKEN }}
|
|
||||||
# Matrix data is passed here:
|
|
||||||
shard-index: ${{ matrix.shard-index }}
|
|
||||||
shard-total: ${{ matrix.total }}
|
|
||||||
no-deps: "true"
|
|
||||||
projects: "chromium,firefox,webkit,Mobile Chrome,Mobile Safari"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,6 @@ inputs:
|
||||||
description: Total number of shards. Set to 1 to disable sharding.
|
description: Total number of shards. Set to 1 to disable sharding.
|
||||||
required: false
|
required: false
|
||||||
default: "1"
|
default: "1"
|
||||||
no-deps:
|
|
||||||
description: Whether to ignore dependencies between Playwright projects (e.g. setup, teardown)
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
projects:
|
|
||||||
description: Comma-separated list of Playwright projects to include, leave empty to use the Playwright default
|
|
||||||
required: false
|
|
||||||
default: ""
|
|
||||||
artifact-retention-days:
|
artifact-retention-days:
|
||||||
description: Number of days to retain the blob report artifact
|
description: Number of days to retain the blob report artifact
|
||||||
required: false
|
required: false
|
||||||
|
|
@ -78,25 +70,12 @@ runs:
|
||||||
WORKING_DIR: ${{ inputs.working-directory }}
|
WORKING_DIR: ${{ inputs.working-directory }}
|
||||||
SHARD_INDEX: ${{ inputs.shard-index }}
|
SHARD_INDEX: ${{ inputs.shard-index }}
|
||||||
SHARD_TOTAL: ${{ inputs.shard-total }}
|
SHARD_TOTAL: ${{ inputs.shard-total }}
|
||||||
NO_DEPS: ${{ inputs.no-deps }}
|
|
||||||
PROJECTS: ${{ inputs.projects }}
|
|
||||||
run: |
|
run: |
|
||||||
SHARD_ARG=""
|
SHARD_ARG=""
|
||||||
if [ "${SHARD_TOTAL}" != "1" ]; then
|
if [ "${SHARD_TOTAL}" != "1" ]; then
|
||||||
SHARD_ARG="--shard=${SHARD_INDEX}/${SHARD_TOTAL}"
|
SHARD_ARG="--shard=${SHARD_INDEX}/${SHARD_TOTAL}"
|
||||||
fi
|
fi
|
||||||
NO_DEPS_ARG=""
|
pnpm --prefix="${WORKING_DIR}" exec playwright test ${SHARD_ARG} --reporter=blob,dot
|
||||||
if [ "${NO_DEPS}" == "true" ]; then
|
|
||||||
NO_DEPS_ARG="--no-deps"
|
|
||||||
fi
|
|
||||||
PROJECTS_ARG=()
|
|
||||||
if [ -n "${PROJECTS}" ]; then
|
|
||||||
IFS=',' read -ra PROJECT_LIST <<< "${PROJECTS}"
|
|
||||||
for project in "${PROJECT_LIST[@]}"; do
|
|
||||||
PROJECTS_ARG+=("--project=${project}")
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
pnpm --prefix="${WORKING_DIR}" exec playwright test ${SHARD_ARG} ${NO_DEPS_ARG} "${PROJECTS_ARG[@]}" --reporter=blob,dot
|
|
||||||
|
|
||||||
- name: Upload blob report
|
- name: Upload blob report
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue