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-12-12 05:44:28 -05:00
|
|
|
uses: actions/setup-go@v5
|
2022-02-09 15:13:33 -05:00
|
|
|
with:
|
2023-03-22 14:33:21 -05:00
|
|
|
cache: false
|
2024-11-08 11:58:55 -05:00
|
|
|
go-version: 1.23.x
|
2022-02-09 15:13:33 -05:00
|
|
|
- name: Check out source code
|
2023-09-05 14:30:49 -05:00
|
|
|
uses: actions/checkout@v4
|
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' .
|