mirror of
https://github.com/pmret/papermario.git
synced 2024-11-13 22:43:00 +01:00
6cd56e72c1
We now lint ALL files in the repository, not just those detected as changed in the commit (the procedure to do this failed when HEAD was exactly 1 commit ahead of the base branch). Also we now only lint pull requests, not in-progress pushes to any branch.
30 lines
604 B
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
|