Skip to content

Commit

Permalink
Hopefully make the tests work
Browse files Browse the repository at this point in the history
  • Loading branch information
SleeplessByte committed Oct 18, 2024
1 parent 478d981 commit 10b8c1e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bin/run-tests-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ set -e
docker build --rm -t exercism/javascript-test-runner .

# Run the Docker image using the settings mimicking the production environment
# # --mount type=tmpfs,dst=/tmp \
docker run \
--rm \
--network none \
--read-only \
--mount type=bind,src="${PWD}/test/fixtures",dst=/opt/test-runner/test/fixtures \
--mount type=tmpfs,dst=/tmp \
--tmpfs /tmp:exec \
--volume "${PWD}/bin/run-tests.sh:/opt/test-runner/bin/run-tests.sh" \
--workdir /opt/test-runner \
--entrypoint /opt/test-runner/bin/run-tests.sh \
Expand Down
3 changes: 2 additions & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ echo ""

echo "✔️ Using slug : $SLUG"
echo "✔️ Using reporter : $REPORTER"
echo "✔️ Using test-root: $INPUT"
echo "✔️ Using srce-root: $INPUT"
echo "✔️ Using test-root: $OUTPUT"
echo "✔️ Using base-root: $ROOT"
echo "✔️ Using setup-env: $SETUP"

Expand Down
2 changes: 1 addition & 1 deletion run-in-docker.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ docker run^
--read-only^
--mount type=bind,src=%cd%/%2,dst=/solution/^
--mount type=bind,src=%cd%/%3,dst=/output/^
--mount type=tmpfs,dst=/tmp^
--tmpfs /tmp:exec^
javascript-test-runner %1 /solution/ /output/
3 changes: 2 additions & 1 deletion run-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ fi
docker build -t javascript-test-runner .

# run image passing the arguments
# --mount type=tmpfs,dst=/tmp \
docker run \
--network none \
--read-only \
--mount type=bind,src=$PWD/$2,dst=/solution/ \
--mount type=bind,src=$PWD/$3,dst=/output/ \
--mount type=tmpfs,dst=/tmp \
--tmpfs /tmp:exec \
javascript-test-runner $1 /solution/ /output/

0 comments on commit 10b8c1e

Please sign in to comment.