From d084ba2326a4911d3878b3c260f89964384ee770 Mon Sep 17 00:00:00 2001 From: "(skovati) Luke" Date: Thu, 14 Sep 2023 12:30:46 -0700 Subject: [PATCH] add line of code count to CI --- .github/workflows/cloc.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/cloc.yml diff --git a/.github/workflows/cloc.yml b/.github/workflows/cloc.yml new file mode 100644 index 0000000000..323f908cf9 --- /dev/null +++ b/.github/workflows/cloc.yml @@ -0,0 +1,33 @@ +name: Count Lines of Code + +on: + pull_request: + branches: + - develop + push: + branches: + - develop + tags: + - v* + +jobs: + cloc: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Install cloc + run: | + sudo apt-get update + sudo apt-get install --yes cloc + - name: Run cloc + run: | + for f in $(ls -D); do + echo "=======================" + echo "$f" + echo "=======================" + cloc \ + --include-lang "TypeScript,SQL,Java" \ + --by-percent cmb \ + $(git ls-files "$f") + done