Skip to content

Commit

Permalink
Create 00-Check_Coding_Convention.yaml (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Silabs-ThieuVu authored Oct 14, 2024
1 parent 3e09183 commit 86c5d85
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/00-Check_Coding_Convention.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 00-Check Coding Convention
on:
push:
branches-ignore:
- main
- "tests/**"
pull_request:
branches:
- main
- "release/**"
workflow_dispatch:
inputs:
branch:
description: 'Branch to test'
type: string
default: 'dev'
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: Trigger
run: echo "Triggered by ${{github.event_name}} event"
- name: Checkout
uses: actions/[email protected]
with:
ref: "${{ github.event.inputs.branch }}"
- 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

0 comments on commit 86c5d85

Please sign in to comment.