Skip to content

Commit 31e6a54

Browse files
committed
overridable playwright config and docker compose
1 parent c36c2f8 commit 31e6a54

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/playwright.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ on:
3131
required: false
3232
type: boolean
3333
default: false
34+
docker-compose-file:
35+
required: false
36+
type: string
37+
default: docker-compose.yml
38+
description: Path to the docker-compose file to use for testing
39+
playwright-config:
40+
required: false
41+
type: string
42+
default: playwright.config.ts
43+
description: Path to the Playwright config file to use for testing
3444

3545
permissions:
3646
contents: read
@@ -106,15 +116,15 @@ jobs:
106116
107117
- name: Start Grafana
108118
run: |
109-
docker compose pull
110-
GRAFANA_VERSION=${{ matrix.GRAFANA_IMAGE.VERSION }} GRAFANA_IMAGE=${{ matrix.GRAFANA_IMAGE.NAME }} docker compose up -d
119+
docker compose -f ${{ inputs.docker-compose-file }} pull
120+
GRAFANA_VERSION=${{ matrix.GRAFANA_IMAGE.VERSION }} GRAFANA_IMAGE=${{ matrix.GRAFANA_IMAGE.NAME }} docker compose -f ${{ inputs.docker-compose-file }} up -d
111121
112122
- name: Wait for Grafana to start
113123
uses: grafana/plugin-actions/wait-for-grafana@main
114124

115125
- name: Run Playwright tests
116126
id: run-tests
117-
run: npx playwright test
127+
run: npx playwright test --config ${{ inputs.playwright-config }}
118128

119129
- name: Upload artifacts
120130
uses: actions/[email protected]

0 commit comments

Comments
 (0)