Skip to content

Commit

Permalink
use lts-slim instead of lts-alpine (#36)
Browse files Browse the repository at this point in the history
* disable npm update check

* global

* try this

* test

* upd

* test

* test

* move link stats

* test

* try disabling fund

* update npm

* ignore scripts

* upd

* test

* test

* ver

* try skipping link

* argh

* try global style

* list

* foo

* test

* test

* test

* blargh

* test current

* verbose

* test

* hmm

* try node:lts

* upd

* try lts-slim

* test

* cleanup

* cleanup

* additional cleanup

* Update Dockerfile
  • Loading branch information
larshp committed Jan 10, 2022
1 parent 76935ed commit 588218c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
14 changes: 12 additions & 2 deletions Dockerfile
@@ -1,6 +1,16 @@
FROM node:lts-alpine
FROM node:lts-slim

RUN apk add --no-cache git
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install git
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*


RUN npm --version

# The docker container is run without network access, so dont check for updates
ENV NO_UPDATE_NOTIFIER=true

WORKDIR /opt/test-runner
COPY . .
Expand Down
15 changes: 12 additions & 3 deletions src/index.ts
Expand Up @@ -45,6 +45,7 @@ class Runner {
this.transpile();
}
if (output.status === "pass") {
this.link();
this.executeTests();
}
fs.writeFileSync(outputFile, JSON.stringify(output));
Expand Down Expand Up @@ -120,12 +121,20 @@ class Runner {
console.log("transpile: " + (end - start) + "ms");
}

private executeTests() {
private link() {
const RUN_RESULT = "_link_result.txt";
const start = Date.now();
const RUN_RESULT = "_run_result.txt";
execSync(`npm link @abaplint/runtime`, {
execSync(`npm link @abaplint/runtime > ` + RUN_RESULT, {
stdio: 'pipe',
cwd: this.tmpDir });
const end = Date.now();
console.log("link: " + (end - start) + "ms");
// console.dir(fs.readFileSync(path.join(this.tmpDir, RUN_RESULT), "utf-8"));
}

private executeTests() {
const start = Date.now();
const RUN_RESULT = "_run_result.txt";

try {
execSync(`node compiled/index.mjs > ` + RUN_RESULT, {
Expand Down

0 comments on commit 588218c

Please sign in to comment.