2022-02-09 15:13:33 -05:00
|
|
|
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:
|
2022-06-07 00:53:33 -05:00
|
|
|
go-version: 1.18.x
|
2022-02-09 15:13:33 -05:00
|
|
|
- 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' .
|