diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dceb7fe0..3aa7c320 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,6 +8,13 @@ on: workflow_dispatch: jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 1 + steps: + - uses: actions/checkout@v4 + - run: ./check-lines.sh + build: runs-on: ubuntu-latest timeout-minutes: 1 diff --git a/check-lines.sh b/check-lines.sh new file mode 100755 index 00000000..12484e10 --- /dev/null +++ b/check-lines.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +cd $DIR + +COUNT="$(find src/ -type f | xargs wc -l | tail -n 1 | awk '{print $1}')" +echo "$COUNT total lines" + +if [ "$COUNT" -gt 5000 ]; then + echo "Exceeded line limit!" + exit 1 +fi