Skip to content

Commit

Permalink
run standalone binary tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Jan 3, 2023
1 parent d1ed4b2 commit 161ec7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@ jobs:
- name: Package
run: yarn package
- name: Run Tests
run: yarn test-matrix --forbid-only ${{ matrix.mocha-args-windows }}
- name: Run Tests on standalone binary
env:
TEST_STANDALONE_PKG: 1
run: yarn test-matrix --forbid-only ${{ matrix.mocha-args-windows }}
4 changes: 3 additions & 1 deletion src/test/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ export function setupCLI(version: string) {
switch (process.env.TEST_STANDALONE_PKG) {
case '1':
case 'true':
const bin = `devcontainer-${os.platform() === 'win32' ? 'win' : 'linux'}-${os.arch()}`;
const OS = os.platform() === 'win32' ? 'win' : 'linux';
const suffix = os.platform() === 'win32' ? '.exe' : '';
const bin = `devcontainer-${OS}-${os.arch()}${suffix}`;
return {
tmp,
cli: path.join(tmp, bin),
Expand Down

0 comments on commit 161ec7b

Please sign in to comment.