papermario/.github/workflows/lint.yaml

30 lines
604 B
YAML

name: Lint
on:
pull_request:
paths:
- 'src/*'
- 'include/*'
- 'format.sh'
- '.clang-tidy'
jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install -y astyle clang-tidy
- run: ./format.sh
# Detect any files changed by ./format.sh
- id: files_formatted
uses: jackton1/find-changed-files@v1.1
with:
files: src, include
- name: Fail if any files reformatted
if: steps.files_formatted.outputs.files_changed == 'true'
run: exit 1