2021-05-11 00:18:44 +06:00
|
|
|
name: PR Lint Format
|
2020-12-10 23:01:51 +06:00
|
|
|
|
|
|
|
on:
|
2021-05-11 00:18:44 +06:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'drivers/**'
|
|
|
|
- 'lib/arm_atsam/**'
|
|
|
|
- 'lib/lib8tion/**'
|
|
|
|
- 'lib/python/**'
|
|
|
|
- 'platforms/**'
|
|
|
|
- 'quantum/**'
|
|
|
|
- 'tests/**'
|
|
|
|
- 'tmk_core/**'
|
2020-12-10 23:01:51 +06:00
|
|
|
|
|
|
|
jobs:
|
2021-05-11 00:18:44 +06:00
|
|
|
lint:
|
2020-12-10 23:01:51 +06:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2021-05-11 00:18:44 +06:00
|
|
|
container: qmkfm/base_container
|
2020-12-10 23:01:51 +06:00
|
|
|
|
|
|
|
steps:
|
2021-02-15 01:51:07 +06:00
|
|
|
- uses: rlespinasse/github-slug-action@v3.x
|
|
|
|
|
2020-12-10 23:01:51 +06:00
|
|
|
- uses: actions/checkout@v2
|
2020-12-17 05:00:02 +06:00
|
|
|
with:
|
2021-05-11 00:18:44 +06:00
|
|
|
fetch-depth: 0
|
2020-12-10 23:01:51 +06:00
|
|
|
|
2021-05-11 00:18:44 +06:00
|
|
|
- uses: trilom/file-changes-action@v1.2.4
|
|
|
|
id: file_changes
|
|
|
|
with:
|
|
|
|
output: ' '
|
|
|
|
fileOutput: ' '
|
2020-12-10 23:01:51 +06:00
|
|
|
|
2021-05-11 00:18:44 +06:00
|
|
|
- name: Run qmk cformat and qmk pyformat
|
|
|
|
shell: 'bash {0}'
|
2021-02-06 18:55:50 +06:00
|
|
|
run: |
|
2021-05-19 01:26:17 +06:00
|
|
|
qmk cformat --core-only -n $(< ~/files.txt)
|
2021-05-11 00:18:44 +06:00
|
|
|
cformat_exit=$?
|
|
|
|
qmk pyformat -n
|
|
|
|
pyformat_exit=$?
|
2021-02-06 18:55:50 +06:00
|
|
|
|
2021-05-11 00:18:44 +06:00
|
|
|
exit $((cformat_exit + pyformat_exit))
|