Action self-test #18
This file contains hidden or 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
| name: Action self-test | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| schedule: | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| action-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| actions: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '26' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run all | |
| - name: Publish Test Report | |
| uses: ./ | |
| with: | |
| report-path: './ctrf/*.json' | |
| summary-delta-report: true | |
| github-report: true | |
| failed-report: true | |
| flaky-report: true | |
| insights-report: true | |
| fail-rate-report: true | |
| flaky-rate-report: true | |
| slowest-report: true | |
| previous-results-report: true | |
| upload-artifact: true | |
| integrations-config: | | |
| { | |
| "slack": { | |
| "enabled": true, | |
| "action": "results", | |
| "options": { | |
| "onFailOnly": false | |
| } | |
| } | |
| } | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| if: always() | |
| - name: Publish Test Report | |
| uses: ./ | |
| with: | |
| report-path: './ctrf/*.json' | |
| pull-request-report: true | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| standard-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Basic Test Report | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| summary-report: true | |
| annotate: false | |
| if: always() | |
| github-report-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Detailed Test Report | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| github-report: true | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| detailed-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Detailed Test Report | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| test-report: true | |
| test-list-report: true | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| failed-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Failed Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| failed-report: true | |
| failed-folded-report: true | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| flaky-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Flaky Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| flaky-report: true | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| ai-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: AI Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| ai-report: true | |
| ai-summary-report: true | |
| annotate: false | |
| if: always() | |
| skipped-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Skipped Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| skipped-report: true | |
| annotate: false | |
| if: always() | |
| suite-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Suite Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| suite-list-report: true | |
| suite-folded-report: true | |
| annotate: false | |
| if: always() | |
| commit-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Commit Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| commit-report: true | |
| annotate: false | |
| if: always() | |
| custom-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Custom Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| custom-report: true | |
| template-path: './templates/custom-report.hbs' | |
| annotate: false | |
| if: always() | |
| community-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Community Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| community-report: true | |
| community-report-name: 'summary-short' | |
| annotate: false | |
| if: always() | |
| previous-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| actions: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '26' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Modify reports | |
| run: npm run modify-reports | |
| - name: Reports Requiring Previous | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/*.json' | |
| previous-results-report: true | |
| flaky-rate-report: true | |
| fail-rate-report: true | |
| insights-report: true | |
| slowest-report: true | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| report-order-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '26' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Modify reports | |
| run: npm run modify-reports | |
| - name: Custom Report Order | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/*.json' | |
| summary-report: true | |
| failed-report: true | |
| flaky-report: true | |
| report-order: 'flaky-report,failed-report,summary-report' | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| collapse-large-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '26' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Modify reports | |
| run: npm run modify-reports | |
| - name: Collapse Large Reports Test | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/*.json' | |
| test-report: true | |
| test-list-report: true | |
| collapse-large-reports: true | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| junit-to-ctrf-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '26' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Modify reports | |
| run: npm run modify-reports | |
| - name: JUnit to CTRF integration test | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/*.xml' | |
| integrations-config: | | |
| { | |
| "junit-to-ctrf": { | |
| "enabled": true, | |
| "action": "convert", | |
| "options": { | |
| "output": "./ctrf-reports/ctrf-report.json", | |
| "toolname": "junit-to-ctrf", | |
| "useSuiteName": false, | |
| "env": { | |
| "appName": "my-app" | |
| } | |
| } | |
| } | |
| } | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| file-reports-test: | |
| needs: action-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '26' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Modify reports | |
| run: npm run modify-reports | |
| - name: File Reports Test | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/*.json' | |
| file-report: true | |
| annotate: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() |