-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 962 Bytes
/
42-norminette.yml
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
name: Norminette v3
on:
push:
paths:
- '**.c'
- '**.h'
branches: [ master ]
pull_request:
paths:
- '**.c'
- '**.h'
branches: [ master ]
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64
- name: Upgrade pip
run: python3 -m pip install --upgrade pip setuptools
- name: Install norminette
run: python3 -m pip install norminette
- name: Run norminette
run: |
rm -rf mlx
LOGS=$(mktemp)
norminette $(find -regex '.*/.*\.\(c\|h\)$' -not -path '*/test/*') | tee $LOGS
echo "ERRORS=$(grep -E 'Error|Warning|KO!' $LOGS | wc -l)" >> $GITHUB_ENV
- name: Checks norminette linter result
run: |
echo "Norminette Result"
[[ $ERRORS == 0 ]]