-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (46 loc) · 1.32 KB
/
coding_convention.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Coding Convention
on:
push:
branches:
- '**'
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
REPO_LINK: https://github.com/${{ github.repository }}.git
jobs:
job1:
name: Check coding convention
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: update-source-code-lib-iec60730
- name: Check working directory
run: |
pwd
ls -la
- name: Set up environment
run: |
ls -la
cp ./tools/.clang-format .
cp ./tools/.clang-tidy .
cp ./tools/.codespell/.codespellrc .
cp ./tools/.codespell/exclude-file.txt .
cp ./tools/.codespell/ignore-words.txt .
ls -la
pip install pre-commit
sudo apt install uncrustify clang-tidy cppcheck
- name: Run test
run: |
git config diff.renameLimit 999999
git fetch origin
touch CodingConventionResult.log
git diff --name-only origin/gen-firmware-on-host-runner origin/update-source-code-lib-iec60730 | xargs pre-commit run --files
- name: Upload Result
if: always()
uses: actions/[email protected]
with:
name: CodingConventionResult.log
path: .
warn: Output a warning but do not fail the action
retention-days: 90