2022-02-09 15:13:33 -05:00
|
|
|
name: "Lines of code statistics"
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
2022-07-11 14:54:49 -05:00
|
|
|
|
|
|
|
permissions: read-all
|
|
|
|
|
2022-02-09 15:13:33 -05:00
|
|
|
jobs:
|
|
|
|
loc:
|
|
|
|
name: Lines of code
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install go
|
2023-03-22 14:33:21 -05:00
|
|
|
uses: actions/setup-go@v4
|
2022-02-09 15:13:33 -05:00
|
|
|
with:
|
2023-03-22 14:33:21 -05:00
|
|
|
cache: false
|
2023-04-27 02:09:46 -05:00
|
|
|
go-version: 1.20.x
|
2022-02-09 15:13:33 -05:00
|
|
|
- name: Check out source code
|
2022-07-13 16:15:33 -05:00
|
|
|
uses: actions/checkout@v3
|
2022-02-09 15:13:33 -05:00
|
|
|
- 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' .
|