Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Aug 7, 2024
1 parent e47047f commit 39c9cca
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ jobs:
# working-directory: ${{ matrix.suite }}

- name: Test
run: bun test ${{ matrix.suite }} --timeout 10000 --rerun-each 2
run: bun test --env-file=../server/.env ${{ matrix.suite }} --timeout 10000 --rerun-each 2
working-directory: test
20 changes: 18 additions & 2 deletions test/tests/server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@ const TEST_RELEASE = true;
let server: Subprocess | undefined;

beforeAll(async () => {
server = Bun.spawn([`target/${TEST_RELEASE ? 'release' : 'debug'}/enstate`], {
cwd: '../server',
server = Bun.spawn(['../server/target/release/enstate'], {

Check failure on line 18 in test/tests/server.spec.ts

View workflow job for this annotation

GitHub Actions / Test ENState 🧪 / Test ENState 🚀 (server)

TypeError: Executable not found in $PATH: "../server/target/release/enstate"

at /home/runner/work/enstate/enstate/test/tests/server.spec.ts:18:18 at /home/runner/work/enstate/enstate/test/tests/server.spec.ts:17:11 at test_implementation (/home/runner/work/enstate/enstate/test/src/test_implementation.ts:10:5) at /home/runner/work/enstate/enstate/test/tests/server.spec.ts:65:1 at 2:1
cwd: '',
env: {...process.env, RUST_LOG: 'info'},
});

const decoder = new TextDecoder();

// @ts-ignore
server.stdout.pipeTo(new WritableStream({
write(chunk) {
console.log(decoder.decode(chunk));
}
}));

// console.log(server.stdout);

console.log('Waiting for server to start...');

let attempts = 0;
Expand All @@ -37,6 +49,10 @@ beforeAll(async () => {
}
}

if (attempts >= 10) {
throw new Error('Server failed to start');
}

console.log('Ready to start testing');
});

Expand Down
File renamed without changes.

0 comments on commit 39c9cca

Please sign in to comment.