@@ -61,6 +61,12 @@ Add to your Github Actions workfile file:
6161npx github-actions-ctrf path-to-your-ctrf-report.json
6262```
6363
64+ Or use a glob pattern:
65+
66+ ``` bash
67+ npx github-actions-ctrf " ctrf/*.json"
68+ ```
69+
6470Before using the commands, ensure that your GitHub Actions runner has Node.js
6571installed.
6672
@@ -340,7 +346,8 @@ This ensures that the test results are available for future runs.
340346You can merge reports if your chosen reporter generates multiple reports through
341347design, parallelisation or otherwise.
342348
343- The [ctrf-cli](https://github.com/ctrf-io/ctrf-cli) package provides a method to
349+ If you use a glob pattern, reports will be merged automatically, otherwise the
350+ [ctrf-cli](https://github.com/ctrf-io/ctrf-cli) package provides a method to
344351merge multiple ctrf json files into a single file.
345352
346353After executing your tests, use the following command :
@@ -352,6 +359,24 @@ npx ctrf merge <directory>
352359Replace directory with the path to the directory containing the CTRF reports you
353360want to merge.
354361
362+ # ## Glob Pattern
363+
364+ A glob pattern is a string that specifies sets of filenames with wildcards and
365+ special characters. This allows you to match multiple files or directories
366+ without specifying each file explicitly.
367+
368+ Here are some examples of glob patterns you can use :
369+
370+ ` ctrf/ctrf-report.json` - Matches the exact file ctrf/ctrf-report.json.
371+
372+ ` ctrf/*.json` - Matches all .json files in the ctrf directory.
373+
374+ ` ctrf/**/*.json` - Matches all .json files in the ctrf directory and its
375+ subdirectories.
376+
377+ ` ctrf/ctrf-report*` - Matches any file starting with ctrf-report (e.g.,
378+ ctrf-report.json, ctrf-report-old.json).
379+
355380# # Pull Requests
356381
357382There are two ways you can post comments on pull requests.
0 commit comments