From a6d5bef163f2fb5b3d9a91d614a84b5bdccfe0e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Fri, 29 Mar 2024 11:36:44 +0100 Subject: [PATCH] Fix ci (#5) * install playwright in CI * build before publishing * run tests headless --- .github/workflows/node.js.yml | 1 + .github/workflows/npm-publish.yml | 2 ++ web-test-runner.config.js | 7 +------ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b05b5e2..f9a9e1c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,5 +27,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm ci + - run: npx playwright install - run: npm run build --if-present - run: npm test diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index e889428..b36c126 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -16,6 +16,7 @@ jobs: with: node-version: 21 - run: npm ci + - run: npx playwright install - run: npm test publish-npm: @@ -28,6 +29,7 @@ jobs: node-version: 21 registry-url: https://registry.npmjs.org/ - run: npm ci + - run: npm build - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/web-test-runner.config.js b/web-test-runner.config.js index a0a1215..ca89b19 100644 --- a/web-test-runner.config.js +++ b/web-test-runner.config.js @@ -8,11 +8,6 @@ export default { return log.args[0] !== "Lit is in dev mode. Not recommended for production! See https://lit.dev/msg/dev-mode for more information."; }, browsers: [ - playwrightLauncher({ - launchOptions: { - headless: false, - devtools: true - }, - }), + playwrightLauncher(), ], }