diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-06-06 18:27:54 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-06-06 23:09:58 (GMT) |
| commit | 7c45f185a32c7bcff47c8fda1acdec82d3213717 (patch) | |
| tree | 53b0419fe2a19e6ec5c89d0be0a11dcd8d4ceb00 /.github/workflows/format.yml | |
| parent | 94b1b330fc1f6e941a797fedabade4e790e28bc2 (diff) | |
| parent | 35dcf8c8607483c104711c9398d47d57147f4389 (diff) | |
Merge remote-tracking branch 'origin/develop' into analog24
Diffstat (limited to '.github/workflows/format.yml')
| -rw-r--r-- | .github/workflows/format.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..9ebacc0 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,38 @@ +name: Code formatting + +on: + pull_request: + branches: [ master, develop ] + paths: + - '**.cpp' + - '**.h' + - '!src/libs/**' + +jobs: + test-format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1000 + + - name: Configure git + run: | + git config --global user.email "-" + git config --global user.name "Autoformatter" + git fetch origin "$GITHUB_BASE_REF":"$GITHUB_BASE_REF" --depth=1000 + + - name: Install clang-format + run: | + sudo apt-get update + sudo apt-get -y install clang-format-12 + + - name: Check formatting + run: tests/test-format.sh + + - name: Upload patches + uses: actions/upload-artifact@v3 + if: failure() + with: + name: Patches + path: ./*.patch |
