Skip to content

Commit 81c5848

Browse files
committed
compliance on pr only
Signed-off-by: Anas Nashif <[email protected]>
1 parent 5ddcf31 commit 81c5848

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/compliance.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,28 @@ jobs:
1919
fetch-depth: 0
2020

2121
- name: Set up Python
22+
if: github.event_name == 'pull_request'
2223
uses: actions/setup-python@v5
2324
with:
2425
python-version: 3.11
2526

2627
- name: cache-pip
28+
if: github.event_name == 'pull_request'
2729
uses: actions/cache@v4
2830
with:
2931
path: ~/.cache/pip
3032
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/compliance.yml') }}
3133

3234
- name: Install python dependencies
35+
if: github.event_name == 'pull_request'
3336
run: |
3437
pip3 install setuptools
3538
pip3 install wheel
3639
pip3 install python-magic lxml junitparser gitlint pylint pykwalify yamllint clang-format unidiff sphinx-lint ruff
3740
pip3 install west
3841
3942
- name: west setup
43+
if: github.event_name == 'pull_request'
4044
env:
4145
BASE_REF: ${{ github.base_ref }}
4246
run: |
@@ -63,6 +67,7 @@ jobs:
6367
exit 1
6468
6569
- name: Run Compliance Tests
70+
if: github.event_name == 'pull_request'
6671
continue-on-error: true
6772
id: compliance
6873
env:
@@ -78,13 +83,15 @@ jobs:
7883
-c origin/${BASE_REF}..
7984
8085
- name: upload-results
86+
if: github.event_name == 'pull_request'
8187
uses: actions/upload-artifact@v4
8288
continue-on-error: true
8389
with:
8490
name: compliance.xml
8591
path: compliance.xml
8692

8793
- name: check-warns
94+
if: github.event_name == 'pull_request'
8895
run: |
8996
if [[ ! -s "compliance.xml" ]]; then
9097
exit 1;

0 commit comments

Comments
 (0)