Skip to content

Commit 9d9ff3b

Browse files
committed
Refactor GitHub Actions workflow to implement a matrix strategy for Windows testing, enhancing flexibility. Remove redundant Playwright installation steps and streamline dependency installation by deleting package-lock.json before running npm install.
1 parent 48d2e6f commit 9d9ff3b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/deployment.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ jobs:
3838
run: npm test
3939
test_win:
4040
name: "Windows"
41-
runs-on: windows-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
os: [windows-latest]
45+
runs-on: ${{ matrix.os }}
4246
steps:
4347
- uses: actions/checkout@v2
4448
- uses: actions/setup-node@v1
@@ -52,14 +56,11 @@ jobs:
5256
${{ runner.os }}-node-
5357
- name: Install dependencies
5458
run: |
59+
if (Test-Path package-lock.json) { del package-lock.json }
5560
npm install
56-
npm install --save-dev @web/test-runner @web/test-runner-playwright @web/dev-server-esbuild @open-wc/testing
57-
- name: Install Playwright
58-
run: |
59-
npx playwright install
60-
npx playwright install-deps
61+
shell: pwsh
6162
- name: Run tests
62-
run: npx web-test-runner test/*.test.js --coverage --node-resolve --playwright --browsers chromium firefox webkit && npx web-test-runner test/visual/*.test.js --coverage --node-resolve --playwright --browsers chromium firefox webkit
63+
run: npm test
6364
tag:
6465
name: "Publishing release"
6566
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'

0 commit comments

Comments
 (0)