Update README.md #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: norminette | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
linter: | |
runs-on: ubuntu-18.04 | |
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: | | |
LOGS=$(mktemp) | |
norminette $(find -regex '.*/.*\.\(c\|h\)$' -not -path '*/minilibx_linux/*') | 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 ]] |