papermario/.github/workflows/lint.yaml

30 lines
604 B
YAML
Raw Normal View History

2020-08-18 00:07:13 +02:00
name: Lint
on:
pull_request:
paths:
- 'src/*'
- 'include/*'
- 'format.sh'
- '.clang-tidy'
2020-08-18 00:07:13 +02:00
jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2020-08-20 00:29:41 +02:00
- run: sudo apt-get install -y astyle clang-tidy
2020-08-18 00:07:13 +02:00
- run: ./format.sh
2020-08-18 00:07:13 +02:00
# Detect any files changed by ./format.sh
2020-08-18 00:07:13 +02:00
- 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'
2020-08-18 01:35:18 +02:00
run: exit 1