Skip to content

Created and populated Movement class. Build successful #48

Created and populated Movement class. Build successful

Created and populated Movement class. Build successful #48

Workflow file for this run

name: Clang-Format
on: [push]
jobs:
clang-format:
name: Clang-Format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Clang-Format
run: sudo apt-get install -y clang-format
- name: Format source code
run: clang-format -i game/**/*.cpp game/**/*.hpp 0 --style file:.clang-format --verbose
- name: Format tests
run: clang-format -i tests/**/*.cpp tests/**/*.hpp 0 --style file:.clang-format --verbose
- name: Check for modifications
id: check_modifications
run: |
git diff --exit-code > /dev/null || echo "modified=true" >> $GITHUB_ENV
- name: Commit and push changes
if: env.modified == 'true'
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Format: ${{github.event.commits[0].message}}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}