build-and-test #1282
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: build-and-test | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| schedule: | |
| - cron: '0 2 * * *' | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build | |
| run: npm run all:action | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Basic Test Report | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| summary-report: true | |
| annotate: false | |
| if: always() | |
| github-report-test: | |
| needs: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Skipped Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| skipped-report: true | |
| annotate: false | |
| if: always() | |
| suite-reports-test: | |
| needs: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Commit Test Reports | |
| uses: ./ | |
| with: | |
| report-path: './ctrf-reports/ctrf-report.json' | |
| commit-report: true | |
| annotate: false | |
| if: always() | |
| custom-reports-test: | |
| needs: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm install | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm install | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm install | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm install | |
| - 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: build-and-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm install | |
| - 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() |