Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,16 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Set Node.js 20.x
- name: Set Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: 20.x
node-version: 24.x

- name: Install dependencies
run: npm ci

- name: Rebuild the dist/ directory
run: |
npm run build
npm run package
run: npm run package

- name: Compare the expected and actual dist/ directories
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/patch-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 20.x
node-version: 24.x

- name: Install dependencies
run: npm ci

- name: Build package
run: |
npm run build
npm run package
run: npm run package

- name: Commit dist changes
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Set Node.js 20.x
- name: Set Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: 20.x
node-version: 24.x

- name: Install
run: npm install

- name: Build
run: npm run build

- name: Package
run: npm run package

Expand All @@ -52,7 +49,7 @@ jobs:
'omc'
'omsimulator'
libraries: |
'Modelica 4.0.0'
'Modelica 4.1.0'
'Modelica 3.2.3+maint.om'
omc-diff: true
- run: echo $OPENMODELICAHOME
18 changes: 9 additions & 9 deletions __tests__/installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function purgeOMC(): Promise<void> {
if (matches != null && matches.length > 0) {
const toRemove = matches[matches.length - 1]
.replace('Install: ', '')
.replace(/:[^\)]*\),*/g, '')
.replace(/:[^)]*\),*/g, '')
console.log(`Files to remove: ${toRemove}`)
await exec.exec(
`/bin/bash -c "sudo apt-get purge ${toRemove} -qy ${'||'} sudo apt-get autoremove -qy"`
Expand All @@ -41,14 +41,14 @@ async function purgeOMC(): Promise<void> {
*/
function linuxTests(): void {
test('Get Linux versions', async () => {
const releaseVersions = installer.getOMVersions()
installer.getOMVersions()
})

test('Get some versions', async () => {
let outVer: installer.VersionType

outVer = installer.getOMVersion('1')
expect(outVer.version).toEqual('1.26.3')
expect(outVer.version).toEqual('1.26.8')

outVer = installer.getOMVersion('1.18')
expect(outVer.version).toEqual('1.18.1')
Expand Down Expand Up @@ -101,7 +101,7 @@ function linuxTests(): void {
const version = installer.getOMVersion('nightly')
await installer.installOM(['omc'], version, '64')
const resVer = await installer.showVersion('omc')
expect(resVer).toContain('1.27.0~dev-')
expect(resVer).toContain('1.28.0~dev-')
},
10 * 60000
)
Expand All @@ -113,7 +113,7 @@ function linuxTests(): void {
const version = installer.getOMVersion('stable')
await installer.installOM(['omc'], version, '64')
const resVer = await installer.showVersion('omc')
expect(resVer).toContain('1.26.')
expect(resVer).toContain('1.27.')
},
10 * 60000
)
Expand Down Expand Up @@ -191,13 +191,13 @@ function commonTests(): void {
'Install Modelica libraries',
async () => {
let output = ''
const originalWrite = process.stdout.write
const originalWrite = process.stdout.write.bind(process.stdout)

// Redirect stdout
process.stdout.write = ((chunk: any) => {
output += chunk
process.stdout.write = (chunk: Uint8Array | string): boolean => {
output += chunk.toString()
return true
}) as any
}

try {
const libraries = ['Modelica 4.0.0', 'NeuralNetwork 2.1.0']
Expand Down
3 changes: 3 additions & 0 deletions __tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../tsconfig.test.json"
}
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ inputs:
default: false

runs:
using: 'node20'
using: 'node24'
main: 'dist/index.js'

branding:
Expand Down
Loading
Loading