mirror of
https://github.com/project-zot/zot.git
synced 2024-12-30 22:34:13 -05:00
ci/cd: count lines of code
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
parent
b2c8533719
commit
4ddfd059b6
1 changed files with 34 additions and 0 deletions
34
.github/workflows/cloc.yml
vendored
Normal file
34
.github/workflows/cloc.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: "Lines of code statistics"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
jobs:
|
||||
loc:
|
||||
name: Lines of code
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17.x
|
||||
- name: Check out source code
|
||||
uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
go install github.com/hhatto/gocloc/cmd/gocloc@latest
|
||||
- name: All sources
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
gocloc .
|
||||
- name: All sources (except tests)
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
gocloc --not-match='.*_test.go' .
|
Loading…
Reference in a new issue