Skip to content

Commit 2eea95b

Browse files
committed
Refactor GitHub Actions workflow to change global dependency installation from npm install -g to npm install --save-dev, improving clarity and ensuring local development consistency. Update test execution command to run both standard and visual regression tests in a single invocation, enhancing the testing process across multiple browsers.
1 parent bb14861 commit 2eea95b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/deployment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
- name: Install dependencies
3434
run: |
3535
npm install
36-
npm install -g @web/test-runner @web/test-runner-playwright @web/dev-server-esbuild @open-wc/testing
36+
npm install --save-dev @web/test-runner @web/test-runner-playwright @web/dev-server-esbuild @open-wc/testing
3737
- name: Install Playwright
3838
run: |
3939
npx playwright install
4040
npx playwright install-deps
4141
- name: Run tests
42-
run: npm run test
42+
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
4343
test_win:
4444
name: "Windows"
4545
runs-on: windows-latest
@@ -57,13 +57,13 @@ jobs:
5757
- name: Install dependencies
5858
run: |
5959
npm install
60-
npm install -g @web/test-runner @web/test-runner-playwright @web/dev-server-esbuild @open-wc/testing
60+
npm install --save-dev @web/test-runner @web/test-runner-playwright @web/dev-server-esbuild @open-wc/testing
6161
- name: Install Playwright
6262
run: |
6363
npx playwright install
6464
npx playwright install-deps
6565
- name: Run tests
66-
run: npm run test
66+
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
6767
tag:
6868
name: "Publishing release"
6969
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'

0 commit comments

Comments
 (0)