mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-08-06 19:11:53 +00:00
Merge pull request #1963 from acelaya-forks/playwright-launch-options
Use preinstalled chrome for tests in CI
This commit is contained in:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -13,4 +13,3 @@ jobs:
|
||||
with:
|
||||
node-version: 26.x
|
||||
publish-coverage: true
|
||||
install-playwright: true
|
||||
|
||||
28
.github/workflows/deploy-preview.yml
vendored
28
.github/workflows/deploy-preview.yml
vendored
@@ -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
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user