Skip to content

Commit

Permalink
feat(tests): protoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohe-Am committed Nov 26, 2023
1 parent e52fbcf commit 4ee2592
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"tasks": {
// "test": "DOCKER_SOCK=/var/run/docker.sock deno test --unstable --allow-env=DOCKER_SOCK --allow-read=/var/run/docker.sock --allow-write=/var/run/docker.sock tests/*"
"test": "deno test --fail-fast --parallel --unstable --allow-run=docker,sudo,which,ls,tar,git,curl --allow-read --allow-env tests/*",
"test": "deno test --fail-fast --parallel --unstable --allow-run=docker,sudo,which,ls,tar,git,curl,unzip --allow-read --allow-env tests/*",
"cache": "deno cache deps/*"
}
}
9 changes: 9 additions & 0 deletions tests/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ await (${confFn.toString()})()`;

// order tests by download size to make failed runs less expensive
await dockerTest([
// 3 megs
{
name: "protoc",
imports: `import plug from "$ghjk/plugs/protoc.ts"`,
confFn: `async () => {
plug({ });
}`,
ePoint: `protoc --version`,
},
// 7 megs
{
name: "act",
Expand Down
2 changes: 1 addition & 1 deletion tests/test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN set -eux; \
export DEBIAN_FRONTEND=noninteractive; \
apt update; \
apt install --yes \
git curl xz-utils \
git curl xz-utils unzip \
;\
apt clean autoclean; apt autoremove --yes; rm -rf /var/lib/{apt,dpkg,cache,log}/;

Expand Down

0 comments on commit 4ee2592

Please sign in to comment.