Skip to content

Commit bbbd485

Browse files
committed
test: also add a local test that downloads the minimal SDK
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 7e0b0fb commit bbbd485

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,7 @@ Thumbs.db
9696

9797
# Ignore built ts files
9898
__tests__/runner/*
99-
lib/**/*
99+
lib/**/*
100+
101+
# Ignore downloaded 64-bit minimal SDK
102+
/git-sdk-64-minimal/

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
"CHERE_INVOKING",
44
"makepkg-git",
55
"mingw-w64-git",
6+
"mingw64",
67
"vstfs://.*"
78
],
89
"cSpell.words": [
910
"Pacman",
1011
"autodrain",
1112
"unzipper",
1213
"vercel"
13-
]
14+
],
15+
"git.ignoreLimitWarning": true
1416
}

__tests__/main.test.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* eslint-disable no-console */
2+
import {statSync} from 'fs'
23
import * as process from 'process'
34
import * as child_process from 'child_process'
45
import * as path from 'path'
@@ -38,4 +39,23 @@ if (process.env.RUN_NETWORK_TESTS !== 'true') {
3839
})
3940
).toEqual(1)
4041
})
42+
43+
jest.setTimeout(5 * 60 * 1000) // this can easily take a minute or five
44+
45+
test('extract the 64-bit minimal SDK', async () => {
46+
const outputDirectory = `${__dirname}/../git-sdk-64-minimal`
47+
expect(
48+
await runAction({
49+
env: {
50+
INPUT_FLAVOR: 'minimal',
51+
INPUT_ARCHITECTURE: 'x86_64',
52+
INPUT_PATH: outputDirectory,
53+
INPUT_VERBOSE: '250'
54+
}
55+
})
56+
).toEqual(0)
57+
expect(
58+
statSync.bind(null, `${outputDirectory}/mingw64/bin/gcc.exe`)
59+
).not.toThrow()
60+
})
4161
}

0 commit comments

Comments
 (0)