Skip to content

Commit 486f2a2

Browse files
authored
Update NPM packages (#65)
* Update @actions/artifact, @actions/core * Change moduleResolution to "Bundler" to work with ncc * Updated development group * Updated dist/ * Added dev container and Dockerfile
1 parent 45b27f2 commit 486f2a2

File tree

10 files changed

+118568
-85881
lines changed

10 files changed

+118568
-85881
lines changed

.devcontainer/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM mcr.microsoft.com/devcontainers/typescript-node:22-bookworm
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
5+
ENV SHELL=/bin/bash
6+
7+
RUN apt-get update && \
8+
apt-get install -y sudo ca-certificates curl gnupg tar wget python3 python3-pip python3-venv python-is-python3 && \
9+
curl -fsSL https://build.openmodelica.org/apt/openmodelica.asc | gpg --dearmor -o /usr/share/keyrings/openmodelica-keyring.gpg && \
10+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/openmodelica-keyring.gpg] https://build.openmodelica.org/apt bookworm stable" > /etc/apt/sources.list.d/openmodelica.list && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends omc && \
13+
apt-get clean && \
14+
rm -rf /var/lib/apt/lists/*
15+
16+
USER node
17+
RUN printf 'success:=installPackage(Modelica, version = "4.0.0", exactMatch = true);\nif not success then exit(1); end if;\n' > /tmp/install.mos && \
18+
omc /tmp/install.mos && \
19+
rm -rf /tmp/install.mos

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
// Dockerfile
5+
"name": "Node.js & TypeScript",
6+
"build": {
7+
"dockerfile": "Dockerfile"
8+
}
9+
10+
// Features to add to the dev container. More info: https://containers.dev/features.
11+
// "features": {},
12+
13+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
14+
// "forwardPorts": [],
15+
16+
// Use 'postCreateCommand' to run commands after the container is created.
17+
// "postCreateCommand": "yarn install",
18+
19+
// Configure tool-specific properties.
20+
// "customizations": {},
21+
22+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
23+
// "remoteUser": "root"
24+
}

__tests__/installdeps.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ describe('installdeps.ts', () => {
3030
fs.writeFileSync(requirementsFile, requirements)
3131
const { stdout, stderr } = await installPythonDeps(requirementsFile)
3232

33-
expect(stderr).toBe('')
33+
// stderr should be empty or start with deprecation warning "DEPRECATION: ompython"
34+
expect(stderr === '' || stderr.startsWith('DEPRECATION: ompython')).toBe(
35+
true
36+
)
37+
3438
expect(stdout).toContain('datetime')
3539
expect(stdout).toContain('matplotlib')
3640
expect(stdout).toContain('monotonic')
@@ -40,6 +44,6 @@ describe('installdeps.ts', () => {
4044
expect(stdout).toContain('simplejson')
4145
expect(stdout).toContain('psutil')
4246
},
43-
2 * 60000 /* 2 minutes */
47+
5 * 60000 /* 5 minutes */
4448
)
4549
})

0 commit comments

Comments
 (0)