Skip to content

Merge pull request #20 from SiliconLabs/add-coding-convention-check-w… #60

Merge pull request #20 from SiliconLabs/add-coding-convention-check-w…

Merge pull request #20 from SiliconLabs/add-coding-convention-check-w… #60

name: Coding Convention
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
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: Install python3.11
if: always()
run: |
sudo apt update
sudo apt upgrade
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install python3.11
python3.11 --version
which python3.11
sudo apt install python3.11-full
curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python3.11
- name: Install Pre-commmit
run: |
python3.11 -m pip install pre-commit
sudo apt install uncrustify clang-tidy cppcheck
- name: Run test
run: |
pre-commit install
pre-commit run --all-files > CodingConventionTool.txt
- name: Upload Result
if: always()
uses: actions/[email protected]
with:
name: CodingConventionResult
path: CodingConventionTool.txt
warn: Output a warning but do not fail the action
retention-days: 90