Skip to content

Commit 7651793

Browse files
committed
File to get the output correctly jsonified for CI
1 parent 1e5252b commit 7651793

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.github/workflows/e2e-testnet.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ jobs:
6161
- name: Generate Test Matrix
6262
working-directory: e2e
6363
id: list-tests
64+
# Assuming tests are all *.test.ts
6465
run: |
65-
# Assuming tests are all *.test.ts
66-
echo "files=$(find . -name '*.test.ts' -not -path './node_modules/*' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
66+
npm run test:relay-list
67+
echo "files=$(npm run test:relay-list)" >> "$GITHUB_OUTPUT"
6768
6869
run-e2e:
6970
name: Run E2E Tests

e2e/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"test:relay-single": "mocha --config .relay-chain.mocharc.json --bail",
1212
"test:relay-funding": "mocha --config .relay-chain-all.mocharc.json --dry-run",
1313
"test:relay": "mocha --config .relay-chain-all.mocharc.json",
14+
"test:relay-list": "node test-files.mjs",
1415
"test:load": "mocha --config .load-test.mocharc.json",
1516
"format": "tsc --noEmit --pretty && prettier --write . && eslint --fix .",
1617
"lint": "tsc --noEmit --pretty && eslint . && prettier --check .",

e2e/test-files.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// A quick file used by CI to list all the test files as an array for the matrix
2+
import process from 'node:process';
3+
import { globSync } from 'glob';
4+
5+
const files = globSync('**/*.test.ts', { ignore: 'node_modules/**' });
6+
process.stdout.write(JSON.stringify(files));

0 commit comments

Comments
 (0)