Skip to content

Double Down ci fix #542

Double Down ci fix

Double Down ci fix #542

Workflow file for this run

name: Housekeeping checks
on:
# allows us to run workflows manually
workflow_dispatch:
pull_request:
branches:
- develop
jobs:
Housekeeping:
runs-on: ubuntu-latest
container:
image: ghcr.io/svalinn/dagmc-ci-ubuntu-18.04-housekeeping:stable
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup environment
run: |
echo "REPO_SLUG=${GITHUB_REPOSITORY}" >> $GITHUB_ENV
echo "PULL_REQUEST=$(echo $GITHUB_REF | cut -d"/" -f3)" >> $GITHUB_ENV
mkdir /root/build_dir
ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC
- name: Housekeeping
run: |
cd $GITHUB_WORKSPACE
git config --global --add safe.directory /__w/DAGMC/DAGMC
find src/ \( -name "*.hpp" -o -name "*.cpp" -o -name "*.hh" -o -name "*.cc" -o -name "*.h" \) \
\( -not -path "src/gtest*" -not -path "src/mcnp/mcnp?/Source/*" -not -path "src/pyne*" \) \
-exec clang-format -style=file -i {} \;
clang_diffs=`git status --porcelain`
if [ -z "${clang_diffs}" ]; then
echo "Style guide checker passed!"
else
echo "ERROR: Style guide checker failed. Please run clang-format."
echo "clang_diffs: ${clang_diffs}"
git diff
exit 1
fi