|
1 | 1 | /* eslint no-console: "off" */ |
| 2 | +import {test, expect} from 'vitest' |
2 | 3 | import * as child_process from 'child_process' |
3 | 4 | import * as path from 'path' |
4 | 5 | import * as process from 'process' |
@@ -40,33 +41,35 @@ if (process.env.RUN_NETWORK_TESTS !== 'true') { |
40 | 41 | ).toEqual(1) |
41 | 42 | }) |
42 | 43 |
|
43 | | - jest.setTimeout(5 * 60 * 1000) // this can easily take a minute or five |
| 44 | + test( |
| 45 | + 'extract the 64-bit minimal SDK', |
| 46 | + async () => { |
| 47 | + const outputDirectory = `${__dirname}/../git-sdk-64-minimal` |
| 48 | + expect( |
| 49 | + await runAction({ |
| 50 | + env: { |
| 51 | + INPUT_FLAVOR: 'minimal', |
| 52 | + INPUT_ARCHITECTURE: 'x86_64', |
| 53 | + INPUT_PATH: outputDirectory, |
| 54 | + INPUT_VERBOSE: '250', |
| 55 | + INPUT_CACHE: 'true' |
| 56 | + } |
| 57 | + }) |
| 58 | + ).toEqual(0) |
| 59 | + expect( |
| 60 | + statSync.bind(null, `${outputDirectory}/mingw64/bin/gcc.exe`) |
| 61 | + ).not.toThrow() |
44 | 62 |
|
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 | | - INPUT_CACHE: 'true' |
| 63 | + const hello = child_process.spawnSync( |
| 64 | + 'usr\\bin\\bash.exe', |
| 65 | + ['-lc', 'cat <(echo hello)'], |
| 66 | + { |
| 67 | + cwd: outputDirectory |
55 | 68 | } |
56 | | - }) |
57 | | - ).toEqual(0) |
58 | | - expect( |
59 | | - statSync.bind(null, `${outputDirectory}/mingw64/bin/gcc.exe`) |
60 | | - ).not.toThrow() |
61 | | - |
62 | | - const hello = child_process.spawnSync( |
63 | | - 'usr\\bin\\bash.exe', |
64 | | - ['-lc', 'cat <(echo hello)'], |
65 | | - { |
66 | | - cwd: outputDirectory |
67 | | - } |
68 | | - ) |
69 | | - expect(hello.stderr.toString()).toBe('') |
70 | | - expect(hello.stdout.toString()).toBe('hello\n') |
71 | | - }) |
| 69 | + ) |
| 70 | + expect(hello.stderr.toString()).toBe('') |
| 71 | + expect(hello.stdout.toString()).toBe('hello\n') |
| 72 | + }, |
| 73 | + 5 * 60 * 1000 |
| 74 | + ) |
72 | 75 | } |
0 commit comments