Skip to content

Commit

Permalink
fix some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed Nov 9, 2023
1 parent 6dde23b commit ee40f59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ COPY deno.jsonc /metrics/deno.jsonc
COPY deno.lock /metrics/deno.lock
COPY LICENSE /metrics/LICENSE
RUN deno task make cache
RUN deno task make get:browser
ENTRYPOINT [ "deno", "task", "make", "run" ]
21 changes: 10 additions & 11 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"run": {
"description": "🚀 Run metrics",
"task": [
"deno task make get:browser &&",
"export CHROME_BIN=$(deno task make get:browser) &&",
"export CACHE_DIRECTORY=$(deno task make get:cache) &&",
"deno run source/run/mod.ts $<*>"
Expand Down Expand Up @@ -90,6 +91,7 @@
"test": {
"description": "🧪 Run tests and collect coverage",
"task": [
"deno task make get:browser &&",
"export CHROME_BIN=$(deno task make get:browser) &&",
"rm .coverage -rf &&",
"deno test source"
Expand Down Expand Up @@ -138,13 +140,7 @@
".cache",
"$HOME/.config/chromium/SingletonLock"
],
"env": [
"CHROME_BIN",
"CHROME_PATH",
"CHROME_EXTRA_FLAGS",
"METRIC_ENV_TEST",
"METRIC_ENV_TEST_UNDEFINED"
]
"env": true
}
}
}
Expand Down Expand Up @@ -207,7 +203,7 @@
"description": "🤖 Build container and run tests and coverage inside the image (CI)",
"task": [
"deno task make docker &&",
"docker run --entrypoint='' metrics:dev sh -c 'deno task make test && deno task make coverage'"
"docker run --rm --entrypoint='' metrics:dev sh -c 'deno task make test && deno task make coverage'"
]
},
"deploy:deno": {
Expand Down Expand Up @@ -246,14 +242,16 @@
"get:browser": {
"description": "🏗️ Get browser path (and install it if necessary)",
"task": [
"deno eval \"$ASTRAL_INSTALL\" &&",
"deno eval \"console.log($ASTRAL_INSTALL)\""
"deno eval \"$ASTRAL_DOWNLOAD\" &&",
"deno eval \"$ASTRAL_BINARY\""
],
"env": {
"ASTRAL_INSTALL": "(Deno.stdout = Deno.stderr, await import('@engine/utils/browser.ts').then(({Browser}) => Browser.getBinary('chrome')))"
"ASTRAL_DOWNLOAD": "await import('@engine/utils/browser.ts').then(({Browser}) => Browser.getBinary('chrome'))",
"ASTRAL_BINARY": "await import('@engine/utils/browser.ts').then(async ({Browser}) => console.log(Deno.env.get('CHROME_BIN') || await Browser.getBinary('chrome')))"
},
"deno": {
"eval": {
"quiet": true,
"permissions": {
"net": [
"googlechromelabs.github.io/chrome-for-testing",
Expand All @@ -279,6 +277,7 @@
},
"deno": {
"eval": {
"quiet": true,
"permissions": {
"env": true
}
Expand Down

0 comments on commit ee40f59

Please sign in to comment.