File tree Expand file tree Collapse file tree 3 files changed +41
-23
lines changed
Expand file tree Collapse file tree 3 files changed +41
-23
lines changed Original file line number Diff line number Diff line change 1+ name : Comment
2+
3+ on :
4+ pull_request_target :
5+ paths :
6+ - submissions/*.json
7+
8+ jobs :
9+ comment :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out
13+ uses : actions/checkout@v3
14+
15+ - uses : actions/cache@v3
16+ with :
17+ path : ~/.cache/pre-commit
18+ key : pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
19+
20+ - name : Set up the environment
21+ uses : ./.github/actions/setup-poetry-env
22+
23+ - name : Compute changed files
24+ id : changed-files
25+ uses : tj-actions/changed-files@v41
26+ with :
27+ files : |
28+ submissions/*.json
29+
30+ - name : Show changed files
31+ run : |
32+ poetry run smtcomp show --into-comment-file comment.md ${{ steps.changed-files.outputs.all_changed_files }}
33+
34+ - name : PR comment with file
35+ uses : thollander/actions-comment-pull-request@v2
36+ with :
37+ filePath : comment.md
38+ comment_tag : summary
Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7- pull_request_target :
8- types : [opened, synchronize, reopened]
7+ pull_request :
98
109jobs :
1110 quality :
2221 - name : Set up the environment
2322 uses : ./.github/actions/setup-poetry-env
2423
25- - name : Compute changed files
26- id : changed-files
27- uses : tj-actions/changed-files@v41
28- with :
29- files : |
30- submissions/*.json
31-
32- - name : Show changed files
33- run : |
34- poetry run smtcomp show --into-comment-file comment.md ${{ steps.changed-files.outputs.all_changed_files }}
35-
36- - name : PR comment with file
37- uses : thollander/actions-comment-pull-request@v2
38- with :
39- filePath : comment.md
40- comment_tag : summary
41-
4224 - name : Run checks
4325 run : make check
4426
Original file line number Diff line number Diff line change @@ -65,10 +65,8 @@ def read_submission(file: Path) -> defs.Submission:
6565 console .print ("</details>" )
6666
6767 if into_comment_file is not None :
68- if len (l ) > 0 :
69- into_comment_file .write_text (console .export_text ())
70- else :
71- into_comment_file .write_text ("" )
68+ into_comment_file .write_text (console .export_text ())
69+
7270
7371@app .command ()
7472def validate (file : str ) -> None :
You can’t perform that action at this time.
0 commit comments