Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "publish release - npm, driver, trace viewer"
name: "publish release - npm, trace viewer"

on:
workflow_dispatch:
Expand All @@ -11,14 +11,13 @@ on:
types: [published]

jobs:
publish-npm-and-driver:
name: "publish NPM and driver"
publish-npm:
name: "publish NPM"
runs-on: ubuntu-24.04
if: github.repository == 'microsoft/playwright'
permissions:
id-token: write # This is required for OIDC login (azure/login, NPM publish) to succeed
id-token: write # This is required for OIDC login (NPM publish) to succeed
contents: read # This is required for actions/checkout to succeed
environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login)
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
Expand Down Expand Up @@ -50,19 +49,6 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
run: utils/publish_all_packages.sh --release

- name: Azure Login
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_PW_CDN_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_PW_CDN_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_PW_CDN_SUBSCRIPTION_ID }}
- name: build & publish driver
env:
AZ_UPLOAD_FOLDER: ${{ github.event_name == 'release' && 'driver' || 'driver/next' }}
run: |
utils/build/build-playwright-driver.sh
utils/build/upload-playwright-driver.sh

publish-trace-viewer:
name: "publish Trace Viewer to trace.playwright.dev"
runs-on: ubuntu-24.04
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/tests_secondary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,6 @@ jobs:
env:
PWTEST_CHANNEL: ${{ matrix.channel }}

build-playwright-driver:
name: "build-playwright-driver"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
- run: npm ci
- run: npm run build
- run: utils/build/build-playwright-driver.sh

test_android:
name: Android
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
Expand Down
7 changes: 0 additions & 7 deletions packages/playwright-core/src/cli/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,16 @@
/* eslint-disable no-console */

import fs from 'fs';
import path from 'path';

import { PipeTransport } from '@utils/pipeTransport';
import { gracefullyProcessExitDoNotHang } from '@utils/processLauncher';
import { packageRoot } from '../package';
import { playwright } from '../inprocess';
import { PlaywrightServer } from '../remote/playwrightServer';
import { DispatcherConnection, PlaywrightDispatcher, RootDispatcher, createPlaywright } from '../server';

import type { BrowserType } from '../client/browserType';
import type { LaunchServerOptions } from '../client/types';

export function printApiJson() {
// Note: this file is generated by build-playwright-driver.sh
console.log(JSON.stringify(require(path.join(packageRoot, 'api.json'))));
}

export function runDriver() {
const dispatcherConnection = new DispatcherConnection();
new RootDispatcher(dispatcherConnection, async (rootScope, { sdkLanguage }) => {
Expand Down
8 changes: 1 addition & 7 deletions packages/playwright-core/src/cli/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { gracefullyProcessExitDoNotHang } from '@utils/processLauncher';
import { getPackageManagerExecCommand } from '@utils/env';
import { packageJSON } from '../package';
import { addTraceCommands } from '../tools/trace/traceCli';
import { runDriver, runServer, printApiJson, launchBrowserServer } from './driver';
import { runDriver, runServer, launchBrowserServer } from './driver';
import { markDockerImage } from './installActions';
import { open, codegen } from './browserActions';
import { installBrowsers, uninstallBrowsers, installDeps } from './installActions';
Expand Down Expand Up @@ -194,12 +194,6 @@ export function decorateProgram(program: Command) {
}).catch(logErrorAndExit);
});

program
.command('print-api-json', { hidden: true })
.action(async function(options) {
printApiJson();
});

program
.command('launch-server', { hidden: true })
.requiredOption('--browser <browserName>', 'Browser name, one of "chromium", "firefox" or "webkit"')
Expand Down
74 changes: 0 additions & 74 deletions utils/build/build-playwright-driver.sh

This file was deleted.

8 changes: 0 additions & 8 deletions utils/build/update-playwright-node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ import path from 'path';
import https from 'https';

const currentFilePath = url.fileURLToPath(import.meta.url);
const buildFilePath = path.join(path.dirname(currentFilePath), 'build-playwright-driver.sh');
const dockerDirectory = path.join(path.dirname(currentFilePath), '../docker');
const dockerfilePaths = await getDockerfilePaths(dockerDirectory);

const latestNodeJsLts = await getLatestNodeJsVersion();

if (refreshBuildScriptVersionNumber(latestNodeJsLts, buildFilePath))
console.log(`Updated build script ${path.relative(process.cwd(), buildFilePath)} to Node.js ${latestNodeJsLts}`);
for (const dockerfilePath of dockerfilePaths) {
const nodeMajorVersion = latestNodeJsLts.split('.')[0];
if (refreshDockerfileVersionNumber(nodeMajorVersion, dockerfilePath))
Expand Down Expand Up @@ -63,11 +60,6 @@ function replaceVersionInFile(filePath, newNodeJsVersion, replacementRegex) {
return fileContent !== newFileContent;
}

function refreshBuildScriptVersionNumber(newNodeJsVersion, buildScriptPath) {
const replacementRegex = new RegExp(`(NODE_VERSION=")(.*)(" # autogenerated via \\.\/${path.basename(currentFilePath).replace('.', '\\.')})`);
return replaceVersionInFile(buildScriptPath, newNodeJsVersion, replacementRegex);
}

function refreshDockerfileVersionNumber(newNodeJsVersion, dockerfilePath) {
const replacementRegex = new RegExp(`(ARG NODE_VERSION=)(.*)( # autogenerated via \\.\/${path.basename(currentFilePath).replace('.', '\\.')})`);
return replaceVersionInFile(dockerfilePath, newNodeJsVersion, replacementRegex);
Expand Down
15 changes: 0 additions & 15 deletions utils/build/upload-playwright-driver.sh

This file was deleted.

Loading