mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:11:57 +00:00
bext: refactor to use yarn workspaces in commands (#33700)
This commit is contained in:
parent
20b48fdd9b
commit
32969882ec
@ -129,7 +129,7 @@ Click reload for Sourcegraph at `about:debugging`
|
||||
|
||||
> **Note**: Requires MacOS with Xcode installed
|
||||
|
||||
1. `yarn --cwd client/browser dev:safari`
|
||||
1. `yarn workspace @sourcegraph/browser dev:safari`
|
||||
1. Open Safari then: `Develop > Allow Unsigned Extensions`
|
||||
1. Open `client/browser/build/Sourcegraph for Safari/Sourcegraph for Safari.xcodeproj` using Xcode
|
||||
1. Choose `Sourcegraph for Safari (macOS)` in the top toolbar and click Run icon
|
||||
|
||||
@ -69,7 +69,7 @@ signale.success('Downloaded and unzipped sourcegraph/sourcegraph repository')
|
||||
if (includeCodeIntelExtensions) {
|
||||
shelljs.pushd(rootDirectoryNameForZip)
|
||||
shelljs.exec('yarn install')
|
||||
shelljs.exec('yarn --cwd client/browser run fetch-code-intel-extensions')
|
||||
shelljs.exec('yarn workspace @sourcegraph/browser run fetch-code-intel-extensions')
|
||||
shelljs.popd()
|
||||
}
|
||||
|
||||
|
||||
@ -234,7 +234,7 @@ Will result in a single trace span for the `./dev/check/docsite.sh` script. But
|
||||
pipeline.AddStep(fmt.Sprintf(":%s: Puppeteer tests for %s extension", browser, browser),
|
||||
// ...
|
||||
bk.Cmd("yarn --frozen-lockfile --network-timeout 60000"),
|
||||
bk.Cmd("yarn --cwd client/browser -s run build"),
|
||||
bk.Cmd("yarn workspace @sourcegraph/browser -s run build"),
|
||||
bk.Cmd("yarn run cover-browser-integration"),
|
||||
bk.Cmd("yarn nyc report -r json"),
|
||||
bk.Cmd("dev/ci/codecov.sh -c -F typescript -F integration"),
|
||||
|
||||
@ -225,7 +225,7 @@ func addBrowserExt(pipeline *bk.Pipeline) {
|
||||
// bk.Env("POLLYJS_MODE", "replay"), // ensure that we use existing recordings
|
||||
// bk.Cmd("git-lfs fetch"),
|
||||
// bk.Cmd("yarn --frozen-lockfile --network-timeout 60000"),
|
||||
// bk.Cmd("yarn --cwd client/browser -s run build"),
|
||||
// bk.Cmd("yarn workspace @sourcegraph/browser -s run build"),
|
||||
// bk.Cmd("yarn run cover-browser-integration"),
|
||||
// bk.Cmd("yarn nyc report -r json"),
|
||||
// bk.Cmd("dev/ci/codecov.sh -c -F typescript -F integration"),
|
||||
@ -417,7 +417,7 @@ func addBrowserExtensionE2ESteps(pipeline *bk.Pipeline) {
|
||||
bk.Env("LOG_BROWSER_CONSOLE", "true"),
|
||||
bk.Env("SOURCEGRAPH_BASE_URL", "https://sourcegraph.com"),
|
||||
bk.Cmd("yarn --frozen-lockfile --network-timeout 60000"),
|
||||
bk.Cmd("yarn --cwd client/browser -s run build"),
|
||||
bk.Cmd("yarn workspace @sourcegraph/browser -s run build"),
|
||||
bk.Cmd("yarn -s mocha ./client/browser/src/end-to-end/github.test.ts ./client/browser/src/end-to-end/gitlab.test.ts"),
|
||||
bk.ArtifactPaths("./puppeteer/*.png"))
|
||||
}
|
||||
@ -433,21 +433,21 @@ func addBrowserExtensionReleaseSteps(pipeline *bk.Pipeline) {
|
||||
pipeline.AddStep(":rocket::chrome: Extension release",
|
||||
withYarnCache(),
|
||||
bk.Cmd("yarn --frozen-lockfile --network-timeout 60000"),
|
||||
bk.Cmd("yarn --cwd client/browser -s run build"),
|
||||
bk.Cmd("yarn --cwd client/browser release:chrome"))
|
||||
bk.Cmd("yarn workspace @sourcegraph/browser -s run build"),
|
||||
bk.Cmd("yarn workspace @sourcegraph/browser release:chrome"))
|
||||
|
||||
// Build and self sign the FF add-on and upload it to a storage bucket
|
||||
pipeline.AddStep(":rocket::firefox: Extension release",
|
||||
withYarnCache(),
|
||||
bk.Cmd("yarn --frozen-lockfile --network-timeout 60000"),
|
||||
bk.Cmd("yarn --cwd client/browser release:firefox"))
|
||||
bk.Cmd("yarn workspace @sourcegraph/browser release:firefox"))
|
||||
|
||||
// Release to npm
|
||||
pipeline.AddStep(":rocket::npm: npm Release",
|
||||
withYarnCache(),
|
||||
bk.Cmd("yarn --frozen-lockfile --network-timeout 60000"),
|
||||
bk.Cmd("yarn --cwd client/browser -s run build"),
|
||||
bk.Cmd("yarn --cwd client/browser release:npm"))
|
||||
bk.Cmd("yarn workspace @sourcegraph/browser -s run build"),
|
||||
bk.Cmd("yarn workspace @sourcegraph/browser release:npm"))
|
||||
}
|
||||
|
||||
// Adds a Buildkite pipeline "Wait".
|
||||
|
||||
@ -24,10 +24,10 @@
|
||||
"test": "jest --testPathIgnorePatterns end-to-end regression integration storybook /out/.*test.js",
|
||||
"test-integration:base": "TS_NODE_PROJECT=client/web/src/integration/tsconfig.json mocha --parallel=$CI --retries=1 --jobs=2",
|
||||
"test-integration": "yarn test-integration:base \"./client/web/src/integration/**/*.test.ts\"",
|
||||
"test-browser-integration": "yarn --cwd client/browser run test-integration",
|
||||
"test-browser-integration": "yarn workspace @sourcegraph/browser run test-integration",
|
||||
"cover-integration:base": "nyc --hook-require=false yarn test-integration:base",
|
||||
"cover-integration": "nyc --hook-require=false yarn test-integration",
|
||||
"cover-browser-integration": "nyc --hook-require=false yarn --cwd client/browser test-integration",
|
||||
"cover-browser-integration": "nyc --hook-require=false yarn workspace @sourcegraph/browser test-integration",
|
||||
"test-lighthouse": "SOURCEGRAPH_API_URL=https://sourcegraph.com lhci collect && lhci open",
|
||||
"test-e2e": "TS_NODE_PROJECT=client/web/src/end-to-end/tsconfig.json mocha ./client/web/src/end-to-end/**/*.test.ts",
|
||||
"cover-e2e": "nyc --hook-require=false --silent=true yarn test-e2e",
|
||||
@ -44,7 +44,7 @@
|
||||
"deduplicate": "yarn-deduplicate -s fewer",
|
||||
"release": "cd dev/release && yarn run release",
|
||||
"docsite:serve": "./dev/docsite.sh -config doc/docsite.json serve -http=localhost:5080",
|
||||
"build-browser-extension": "yarn --cwd client/browser run build",
|
||||
"build-browser-extension": "yarn workspace @sourcegraph/browser run build",
|
||||
"install:sg": "dev/sg/install.sh",
|
||||
"optimize-svg-assets": "svgo --multipass --config=\"./svgo.config.js\""
|
||||
},
|
||||
|
||||
@ -693,7 +693,7 @@ commands:
|
||||
cmd: env
|
||||
|
||||
bext:
|
||||
cmd: yarn --cwd client/browser dev
|
||||
cmd: yarn workspace @sourcegraph/browser dev
|
||||
install: yarn
|
||||
|
||||
defaultCommandset: enterprise
|
||||
@ -944,16 +944,16 @@ tests:
|
||||
install: ENTERPRISE=1 yarn build-web
|
||||
|
||||
bext:
|
||||
cmd: yarn --cwd client/browser test
|
||||
cmd: yarn workspace @sourcegraph/browser test
|
||||
|
||||
bext-build:
|
||||
cmd: EXTENSION_PERMISSIONS_ALL_URLS=true yarn --cwd client/browser build
|
||||
cmd: EXTENSION_PERMISSIONS_ALL_URLS=true yarn workspace @sourcegraph/browser build
|
||||
|
||||
bext-integration:
|
||||
cmd: POLLYJS_MODE=replay yarn --cwd client/browser test-integration
|
||||
cmd: POLLYJS_MODE=replay yarn workspace @sourcegraph/browser test-integration
|
||||
|
||||
bext-e2e:
|
||||
cmd: yarn --cwd client/browser mocha ./src/end-to-end/github.test.ts ./src/end-to-end/gitlab.test.ts
|
||||
cmd: yarn workspace @sourcegraph/browser mocha ./src/end-to-end/github.test.ts ./src/end-to-end/gitlab.test.ts
|
||||
env:
|
||||
SOURCEGRAPH_BASE_URL: https://sourcegraph.com
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user