Skip to content

testkit: Add support for building the Deno driver #892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 9, 2022
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"clean": "lerna clean -y && lerna run clean",
"build": "lerna bootstrap --ci",
"build::deno": "(cd ./packages/neo4j-driver-deno && deno run --allow-read --allow-write --allow-net ./generate.ts --version=5.0.0-dev)",
"docs": "lerna run docs --stream --concurrency 1",
"test::unit": "lerna run test::unit --stream",
"test::integration": "lerna run test::integration --stream",
Expand Down
8 changes: 8 additions & 0 deletions testkit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN apt-get update && \
nodejs \
firefox \
nodejs \
unzip \
&& rm -rf /var/lib/apt/lists/*

RUN /bin/bash -c "hash -d npm"
Expand All @@ -45,6 +46,10 @@ COPY CustomCAs/* /usr/local/share/custom-ca-certificates/

RUN update-ca-certificates --verbose

# Add Deno
RUN curl -fsSL https://deno.land/x/install/install.sh | sh
RUN mv /root/.deno/bin/deno /usr/bin/

# Creating an user for building the driver and running the tests
RUN useradd -m driver && echo "driver:driver" | chpasswd && adduser driver sudo
VOLUME /driver
Expand All @@ -57,5 +62,8 @@ CMD /bin/bash
RUN mkdir /home/driver/.npm_global
RUN npm config set prefix /home/driver/.npm_global


## Versions
RUN node --version
RUN npm --version
RUN deno --version
1 change: 1 addition & 0 deletions testkit/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def init_monorepo():
def clean_and_build():
run_in_driver_repo(["npm", "run", "clean"], env=os.environ)
run_in_driver_repo(["npm", "run", "build"], env=os.environ)
run_in_driver_repo(["npm", "run", "build::deno"], env=os.environ)


if __name__ == "__main__":
Expand Down