File tree Expand file tree Collapse file tree 2 files changed +1550
-0
lines changed
Expand file tree Collapse file tree 2 files changed +1550
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ # Find issues in O2 code
3+ name : O2 linter
4+
5+ ' on ' : [pull_request, push]
6+ permissions : {}
7+ env :
8+ MAIN_BRANCH : master
9+
10+ concurrency :
11+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
12+ cancel-in-progress : true
13+
14+ jobs :
15+ o2-linter :
16+ name : O2 linter
17+ runs-on : ubuntu-24.04
18+ steps :
19+ - name : Checkout Code
20+ uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0 # needed to get the full history
23+ - name : Run tests
24+ run : |
25+ # Diff against the common ancestor of the source branch and the main branch.
26+ readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.MAIN_BRANCH }}...)
27+ [ ${{ github.event_name }} == 'pull_request' ] && options="-g"
28+ # shellcheck disable=SC2086 # Ignore unquoted options.
29+ python3 Scripts/o2_linter.py $options "${files[@]}"
30+ echo "Tip: If you allow actions in your fork repository, O2 linter will run when you push commits."
You can’t perform that action at this time.
0 commit comments