Merge pull request #1963 from acelaya-forks/playwright-launch-options

Use preinstalled chrome for tests in CI
This commit is contained in:
Alejandro Celaya
2026-08-06 10:22:36 +02:00
committed by GitHub
3 changed files with 4 additions and 30 deletions

View File

@@ -13,4 +13,3 @@ jobs:
with:
node-version: 26.x
publish-coverage: true
install-playwright: true

View File

@@ -1,28 +0,0 @@
name: Deploy preview
on:
pull_request_target: null
jobs:
deploy:
runs-on: ubuntu-24.04
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Use node.js
uses: actions/setup-node@v6
with:
node-version: 24.14
- name: Build
run: |
npm ci && \
node ./scripts/set-homepage.cjs /shlink-web-client/${GITHUB_HEAD_REF#refs/heads/} && \
node --run build
- name: Deploy preview
uses: shlinkio/deploy-preview-action@v1.0.1
with:
folder: build

View File

@@ -41,7 +41,10 @@ export default defineConfig({
test: {
// Run tests in an actual browser
browser: {
provider: playwright(),
provider: playwright({
// In CI, this instructs playwright to use a pre-existing Chrome instance
launchOptions: process.env.CI ? { channel: 'chrome' } : undefined,
}),
enabled: true,
headless: true,
screenshotFailures: false,