ci: Add concurrency and remove redundant lines

- Add concurrency
- Add workflow dispatch
- Reformat for better readability
- Remove redundant lines
- Enable parallel builds
- Add pull request build
- Enable only master branch for CI

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
Avinal Kumar
2021-10-31 23:13:44 +05:30
committed by Paweł Kotiuk
parent 688dd68860
commit e1c2fbff1f
3 changed files with 193 additions and 184 deletions

View File

@@ -1,6 +1,16 @@
name: Check code formatting
on: pull_request
concurrency:
group: format-${{ github.head_ref }}
cancel-in-progress: true
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
@@ -15,6 +25,6 @@ jobs:
clang-format --version
wget https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py
chmod +x ./run-clang-format.py
- name: Test
run: ./run-clang-format.py -r src