From 5324c996e719dfb0546cf42e0bc9a4e908687c0f Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Mon, 22 Apr 2024 12:38:11 -0700 Subject: [PATCH] Add SCC badges and GH action --- .github/.wordlist.txt | 5 +++++ .github/workflows/README.md | 2 +- .github/workflows/linter.yml | 13 +++++++++++++ README.md | 2 ++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 7ba85ff2..7aab7ad7 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -7,11 +7,13 @@ Autoscaler BACKEND balancer blockquote +boyter BPF brightgreen Bugfixes CentOS CNI +COCOMO codebase config CONTAINERD @@ -111,10 +113,12 @@ RESOLVCONF rubocop RUNTIME runtimes +scc serverless SERVICEMESH SIG SIGs +sloc snetworkplumbingwg src sriov @@ -136,6 +140,7 @@ vmwrapper VXLAN WEBHOOK WIP +xyz YAML yml YOUKI diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 59214bf5..fcea891b 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -4,7 +4,7 @@ | :--------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------- | | [diagram](./diagram.yml) | Generates the codebase diagram used by the main README.md file | on new commit/push on master | | [distros](./distros.yml) | Updates the Vagrant box versions for Distro list supported file | scheduled/manual trigger | -| [linter](./linter.yml) | Verifies broken links in documentation and runs multiple linter tools | on new commit/push on master | +| [linter](./linter.yml) | Counts Line of Codes, verifies broken links in docs and runs linter tools | on new commit/push on master | | [on-demand_ci](./on-demand_ci.yml) | Runs BDD and integration tests for different container runtimes and projects | on new commit/push on master | | [on-demand_corner](./on-demand_corner.yml) | Runs integration tests for corner cases (kong, rook, haproxy, kubewarden) | on new commit/push on master | | [on-demand_molecule](./on-demand_molecule.yml) | Runs unit tests for ansible roles | on new commit/push on master | diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 1712dc47..82cdd5fe 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -13,6 +13,19 @@ on: push: pull_request: jobs: + get-sloc: + name: Count Lines of Code + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.3 + - name: Setup Go + uses: actions/setup-go@v5.0.0 + with: + go-version: '>=1.20.0' + - name: Install dependencies + run: go install github.com/boyter/scc/v3@latest + - name: Run scc tool + run: scc --format wide check-broken-links: name: Check documentation external links runs-on: ubuntu-latest diff --git a/README.md b/README.md index e06b5c39..714ff9c6 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop) ![visitors](https://visitor-badge.laobi.icu/badge?page_id=electrocucaracha.krd) +[![Scc Code Badge](https://sloc.xyz/github/electrocucaracha/krd?category=code)](https://github.com/boyter/scc/) +[![Scc COCOMO Badge](https://sloc.xyz/github/electrocucaracha/krd?category=cocomo)](https://github.com/boyter/scc/) ## Summary