Skip to content

Commit c9ff285

Browse files
committed
ci(astyle): made astyle check standalone workflow
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 818ac91 commit c9ff285

File tree

2 files changed

+48
-21
lines changed

2 files changed

+48
-21
lines changed

.github/workflows/Continuous-Integration.yml

-21
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,6 @@ on:
2727
# Allows you to run this workflow manually from the Actions tab
2828
workflow_dispatch:
2929
jobs:
30-
astyle_check:
31-
runs-on: ubuntu-latest
32-
name: AStyle check
33-
steps:
34-
# First of all, clone the repo using the checkout action.
35-
- name: Checkout
36-
uses: actions/checkout@main
37-
38-
- name: Astyle check
39-
id: Astyle
40-
uses: stm32duino/actions/astyle-check@main
41-
with:
42-
astyle-definition: 'CI/astyle/.astylerc'
43-
ignore-path-list: 'CI/astyle/.astyleignore'
44-
45-
# Use the output from the `Astyle` step
46-
- name: Astyle Errors
47-
if: failure()
48-
run: |
49-
cat ${{ steps.Astyle.outputs.astyle-result }}
50-
exit 1
5130
core_build:
5231
runs-on: ubuntu-latest
5332
name: Core compilation

.github/workflows/astyle.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Check code formatting with astyle
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths-ignore:
7+
- '*.json'
8+
- '**.md'
9+
- keywords.txt
10+
- CI/**
11+
- '!CI/astyle/.astyleignore'
12+
- '!CI/astyle/.astylerc'
13+
- '!CI/astyle/astyle.py'
14+
- tools/**
15+
pull_request:
16+
paths-ignore:
17+
- '*.json'
18+
- '**.md'
19+
- keywords.txt
20+
- CI/**
21+
- '!CI/astyle/.astyleignore'
22+
- '!CI/astyle/.astylerc'
23+
- '!CI/astyle/astyle.py'
24+
- tools/**
25+
# Allows you to run this workflow manually from the Actions tab
26+
workflow_dispatch:
27+
jobs:
28+
astyle_check:
29+
runs-on: ubuntu-latest
30+
name: Check for astyle errors
31+
steps:
32+
# First of all, clone the repo using the checkout action.
33+
- name: Checkout
34+
uses: actions/checkout@main
35+
36+
- name: Astyle check
37+
id: Astyle
38+
uses: stm32duino/actions/astyle-check@main
39+
with:
40+
astyle-definition: 'CI/astyle/.astylerc'
41+
ignore-path-list: 'CI/astyle/.astyleignore'
42+
43+
# Use the output from the `Astyle` step
44+
- name: Astyle Errors
45+
if: failure()
46+
run: |
47+
cat ${{ steps.Astyle.outputs.astyle-result }}
48+
exit 1

0 commit comments

Comments
 (0)