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 4e92744
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ jobs:
- name: Type-Check
run: yarn type-check
- name: Package
run: yarn package
run: yarn package && yarn package-standalone
- name: Run Tests
run: yarn test-matrix --forbid-only ${{ matrix.mocha-args-windows }}
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 4e92744

Please sign in to comment.