main #755
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
name: main | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' && github.ref == 'refs/heads/main' || github.event_name != 'schedule' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npx tsc | |
- name: Test summary | |
run: node dist/index.js summary ctrf-reports/ctrf-report.json | |
- name: Test historical | |
run: node dist/index.js historical ctrf-reports/ctrf-report.json --annotate false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Test suite folded | |
run: node dist/index.js suite-folded ctrf-reports/ctrf-report.json --annotate false | |
- name: Test failed | |
run: node dist/index.js failed ctrf-reports/ctrf-report.json --annotate false | |
- name: Test failed rate | |
run: node dist/index.js failed-rate ctrf-reports/ctrf-report.json --annotate false --title "Failed rate" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Test failed folded | |
run: node dist/index.js failed-folded ctrf-reports/ctrf-report.json --annotate false | |
- name: Test flaky | |
run: node dist/index.js flaky ctrf-reports/ctrf-report.json --annotate false | |
- name: Test flaky rate | |
run: node dist/index.js flaky-rate ctrf-reports/ctrf-report.json --annotate false --title "Flaky rate" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Test ai | |
run: node dist/index.js ai ctrf-reports/ctrf-report.json --annotate false | |
- name: Test skipped | |
run: node dist/index.js skipped ctrf-reports/ctrf-report.json --annotate false | |
- name: Test custom summary | |
run: node dist/index.js custom ctrf-reports/ctrf-report.json templates/custom-summary.hbs --annotate false | |
- 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 |