Skip to content

Commit

Permalink
File to get the output correctly jsonified for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wilwade committed Dec 5, 2024
1 parent 1e5252b commit 7651793
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/e2e-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ jobs:
- name: Generate Test Matrix
working-directory: e2e
id: list-tests
# Assuming tests are all *.test.ts
run: |
# Assuming tests are all *.test.ts
echo "files=$(find . -name '*.test.ts' -not -path './node_modules/*' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
npm run test:relay-list
echo "files=$(npm run test:relay-list)" >> "$GITHUB_OUTPUT"
run-e2e:
name: Run E2E Tests
Expand Down
1 change: 1 addition & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"test:relay-single": "mocha --config .relay-chain.mocharc.json --bail",
"test:relay-funding": "mocha --config .relay-chain-all.mocharc.json --dry-run",
"test:relay": "mocha --config .relay-chain-all.mocharc.json",
"test:relay-list": "node test-files.mjs",
"test:load": "mocha --config .load-test.mocharc.json",
"format": "tsc --noEmit --pretty && prettier --write . && eslint --fix .",
"lint": "tsc --noEmit --pretty && eslint . && prettier --check .",
Expand Down
6 changes: 6 additions & 0 deletions e2e/test-files.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// A quick file used by CI to list all the test files as an array for the matrix
import process from 'node:process';
import { globSync } from 'glob';

const files = globSync('**/*.test.ts', { ignore: 'node_modules/**' });
process.stdout.write(JSON.stringify(files));

0 comments on commit 7651793

Please sign in to comment.