Skip to content

Commit 15dc515

Browse files
mcasimiraddaleax
andauthored
chore: make build package private (#343)
* chore: make build package private * wip: try speed up tests and run e2e on real binary * use gcc 6 for build * run test-e2e-ci with node 12 Co-authored-by: Anna Henningsen <[email protected]>
1 parent 4d0fdc8 commit 15dc515

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

.evergreen.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ variables:
2727
-e NODE_JS_VERSION \
2828
-e BUILD_VARIANT \
2929
--rm -v $PWD:/tmp/build --network host ubuntu16.04-build \
30-
-c 'cd /tmp/build && npm run evergreen-release package'
30+
-c 'cd /tmp/build && npm run evergreen-release package && dist/mongosh --version'
3131
else
3232
npm run evergreen-release package
3333
if [ `uname` == Darwin ]; then
@@ -43,7 +43,11 @@ variables:
4343
bash ~/release_mongosh.sh
4444
fi
4545
46-
ls -la dist/
46+
source .evergreen/.setup_env
47+
export MONGOSH_TEST_EXECUTABLE_PATH="$(pwd)/dist/mongosh"
48+
echo "$MONGOSH_TEST_EXECUTABLE_PATH"
49+
npm run test-e2e-ci
50+
4751
- &compile_and_release_ps
4852
command: shell.exec
4953
params:
@@ -57,6 +61,11 @@ variables:
5761
$Env:PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "true"
5862
$Env:EVERGREEN_EXPANSIONS_PATH = $(Join-Path -Path '..' -ChildPath 'tmp/expansions.yaml' -Resolve)
5963
npm run evergreen-release package
64+
.\.evergreen\DownloadAndRunMongod
65+
$Env:MONGOSH_TEST_SERVER_URL = "mongodb://localhost:27018"
66+
$Env:MONGOSH_TEST_EXECUTABLE_PATH = $(Join-Path -Path '.' -ChildPath 'dist/mongosh.exe' -Resolve)
67+
echo "$Env:MONGOSH_TEST_EXECUTABLE_PATH"
68+
npm run test-e2e-ci
6069
6170
# Functions are any command that can be run.
6271
#
@@ -116,9 +125,6 @@ functions:
116125
set -e
117126
source .evergreen/.setup_env
118127
export EVERGREEN_EXPANSIONS_PATH="$(pwd)/../tmp/expansions.yaml"
119-
export MONGOSH_TEST_EXECUTABLE_PATH="$(pwd)/dist/mongosh"
120-
echo "$MONGOSH_TEST_EXECUTABLE_PATH"
121-
npm run compile-exec
122128
npm run test-ci
123129
test_ps:
124130
- command: expansions.write
@@ -134,10 +140,7 @@ functions:
134140
.\.evergreen\SetupEnv
135141
.\.evergreen\DownloadAndRunMongod
136142
$Env:EVERGREEN_EXPANSIONS_PATH = $(Join-Path -Path '..' -ChildPath 'tmp/expansions.yaml' -Resolve)
137-
npm run compile-exec
138-
$Env:MONGOSH_TEST_EXECUTABLE_PATH = $(Join-Path -Path '.' -ChildPath 'dist/mongosh.exe' -Resolve)
139143
$Env:MONGOSH_TEST_SERVER_URL = "mongodb://localhost:27018"
140-
echo "$Env:MONGOSH_TEST_EXECUTABLE_PATH"
141144
npm run test-ci
142145
release_macos:
143146
- command: expansions.write

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"check-ci": "lerna run check",
2020
"test": "lerna run test",
2121
"test-ci": "lerna run test-ci",
22+
"test-e2e": "lerna run test-e2e",
23+
"test-e2e-ci": "lerna run test-e2e-ci",
2224
"compile-ts": "lerna run compile-ts",
2325
"compile-cli": "lerna run compile-ts --scope @mongosh/cli-repl --include-dependencies",
2426
"prestart-cli": "npm run compile-cli",

packages/build/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@mongosh/build",
33
"version": "0.4.0",
4+
"private": true,
45
"description": "MongoDB Shell Build Tools",
56
"main": "lib/index.js",
67
"types": "lib/index.d.ts",

packages/cli-repl/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"test-ci": "mocha -r \"../../scripts/import-expansions.js\" --timeout 60000 -r ts-node/register \"./{src,test}/**/*.spec.ts\"",
2323
"pretest-e2e": "npm run compile-ts",
2424
"test-e2e": "mocha -r \"../../scripts/import-expansions.js\" --timeout 15000 --colors -r ts-node/register \"./test/e2e.spec.ts\"",
25+
"test-e2e-ci": "mocha -r \"../../scripts/import-expansions.js\" --timeout 15000 --colors -r ts-node/register \"./test/e2e.spec.ts\"",
2526
"lint": "eslint \"**/*.{js,ts,tsx}\"",
2627
"check": "npm run lint",
2728
"prepublish": "npm run compile-ts"

scripts/docker/ubuntu16.04-build.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ RUN echo "deb-src https://deb.nodesource.com/node_12.x xenial main" | tee -a /et
1212
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
1313

1414
RUN apt-get update
15-
RUN apt-get -y -qq install nodejs g++-9 rpm
15+
RUN apt-get -y -qq install nodejs g++-6 rpm
1616

17-
ENV CC=gcc-9
18-
ENV CXX=g++-9
17+
ENV CC=gcc-6
18+
ENV CXX=g++-6
1919

2020
ENTRYPOINT [ "bash" ]

0 commit comments

Comments
 (0)