File tree Expand file tree Collapse file tree 3 files changed +69
-15
lines changed
Expand file tree Collapse file tree 3 files changed +69
-15
lines changed Original file line number Diff line number Diff line change 5959 run : python3 src/ci/github-actions/calculate-job-matrix.py >> $GITHUB_OUTPUT
6060 id : jobs
6161
62- spellcheck :
63- name : run spellchecker
64- runs-on : ubuntu-latest
65- steps :
66- - name : Checkout the source code
67- uses : actions/checkout@v4
68-
69- - name : check typos
70- # sync version with src/tools/tidy/src/ext_tool_checks.rs
71- 72- with :
73- # sync target files with src/tools/tidy/src/ext_tool_checks.rs
74- files : ./compiler ./library
75- config : ./typos.toml
76-
7762 job :
7863 name : ${{ matrix.name }}
7964 needs : [ calculate_matrix ]
Original file line number Diff line number Diff line change 1+ # This workflow posts review comment from spellchecker
2+
3+ name : post review
4+ on :
5+ workflow_run :
6+ workflows : [Spellcheck]
7+ types :
8+ - completed
9+
10+ jobs :
11+ post_review :
12+ runs-on : ubuntu-latest
13+ if : ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
14+ steps :
15+ - name : download spellcheck results
16+ uses : actions/download-artifact@v4
17+ with :
18+ name : spellcheck-artifact
19+ run-id : ${{ github.event.workflow_run.id }}
20+
21+ - name : install reviewdog
22+ uses : reviewdog/action-setup@v1
23+ with :
24+ reviewdog_version : v0.20.3
25+
26+ - name : run reviewdog
27+ env :
28+ REVIEWDOG_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ CI_PULL_REQUEST : ${{ github.event.workflow_run.pull_requests[0].number }}
30+ run : |
31+ reviewdog \
32+ -f=diff \
33+ -f.diff.strip=1 \
34+ -reporter="github-pr-review" \
35+ -filter-mode=diff_context \
36+ -level=error < spellcheck_results.diff
Original file line number Diff line number Diff line change 1+ # This workflow runs spellcheck job
2+
3+ name : Spellcheck
4+ on :
5+ pull_request :
6+ branches :
7+ - " **"
8+
9+ jobs :
10+ spellcheck :
11+ name : run spellchecker
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout the source code
15+ uses : actions/checkout@v4
16+
17+ - name : check typos
18+ # sync version with src/tools/tidy/src/ext_tool_checks.rs
19+ 20+ with :
21+ # sync target files with src/tools/tidy/src/ext_tool_checks.rs
22+ files : ./compiler ./library
23+ config : ./typos.toml
24+ write_changes : true
25+
26+ - name : save diff
27+ run : git diff > "spellcheck_results.diff"
28+
29+ - uses : actions/upload-artifact@v4
30+ with :
31+ name : spellcheck-artifact
32+ path : ./spellcheck_results.diff
33+ retention-days : 1
You can’t perform that action at this time.
0 commit comments