2022-02-09 20:13:33 +00:00
|
|
|
name: "Lines of code statistics"
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
2022-07-11 19:54:49 +00:00
|
|
|
|
|
|
|
permissions: read-all
|
|
|
|
|
2022-02-09 20:13:33 +00:00
|
|
|
jobs:
|
|
|
|
loc:
|
|
|
|
name: Lines of code
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install go
|
2023-12-12 02:44:28 -08:00
|
|
|
uses: actions/setup-go@v5
|
2022-02-09 20:13:33 +00:00
|
|
|
with:
|
2023-03-22 12:33:21 -07:00
|
|
|
cache: false
|
2024-02-07 20:54:28 +02:00
|
|
|
go-version: 1.21.x
|
2022-02-09 20:13:33 +00:00
|
|
|
- name: Check out source code
|
2023-09-05 12:30:49 -07:00
|
|
|
uses: actions/checkout@v4
|
2022-02-09 20:13:33 +00: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' .
|