-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from ctrf-io/feat/community-reports
Feat/community reports
- Loading branch information
Showing
12 changed files
with
171 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: community-example | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
testing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build | ||
run: npm run build | ||
- name: Test community report | ||
run: node dist/core/cli.js community ctrf-reports/ctrf-report.json summary-short --title "Community report" | ||
- name: Upload test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ctrf-report | ||
path: ctrf-reports/ctrf-report.json | ||
- name: Upload test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: custom-artifact-name | ||
path: ctrf-reports/ctrf-report-no-fails.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ node_modules/ | |
coverage/ | ||
templates/ | ||
reports/ | ||
community-reports/ | ||
.github/ | ||
.exlintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Template Name: summary-short | ||
|
||
## Description | ||
|
||
A brief description of what this template is for. | ||
e.g., "This template provides a summary view with key metrics and links to | ||
failing test cases." | ||
|
||
--- | ||
|
||
## How to Use | ||
|
||
Use this template by referencing its name: | ||
`summary-short` | ||
|
||
Add this to your workflow file: | ||
|
||
```yaml | ||
community-report-name: summary-short | ||
``` | ||
## Important Considerations | ||
Highlight important considerations e.g. particular CTRF report properties that should be included in the report | ||
## What it looks like | ||
| **Tests 📝** | **Passed ✅** | **Failed ❌** | **Duration ⏱️** | | ||
| --- | --- | --- | --- | | ||
| 10 | 5 | 3 | 11.0s | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
| **Tests {{getCtrfEmoji "tests"}}** | **Passed {{getCtrfEmoji "passed"}}** | **Failed {{getCtrfEmoji "failed"}}** | **Duration {{getCtrfEmoji "duration"}}** | | ||
| --- | --- | --- | --- | | ||
| {{ctrf.summary.tests}} | {{ctrf.summary.passed}} | {{ctrf.summary.failed}} | {{formatDuration ctrf.summary.start ctrf.summary.stop}} | |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export const GITHUB_TOKEN = process.env.GITHUB_TOKEN | ||
export const GITHUB_API_URL = process.env.GITHUB_API_URL | ||
export const COMMUNITY_REPORTS_PATH = 'community-reports' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters