Skip to content

Commit 1d08a8d

Browse files
authored
ci: add license header validation check (#27)
Fixes #18 Confirmed it works by removing the license header for `CMakeLists.txt` here: https://github.com/google/ml-flashpoint/pull/27/checks?sha=7bb36ee0cf3c9d14ff2a74e532f6e39afacf0350
1 parent 6e20be2 commit 1d08a8d

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/build_and_test.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ jobs:
8080
--gcov-ignore-parse-errors negative_hits.warn \
8181
--gcov-ignore-parse-errors suspicious_hits.warn
8282
83-
lint:
84-
runs-on: ubuntu-24.04-32core
83+
lint-code:
84+
runs-on: ubuntu-latest
8585
strategy:
8686
matrix:
8787
python-version: [ "3.10" ]
@@ -108,3 +108,20 @@ jobs:
108108
sudo apt-get update && sudo apt-get install -y clang-format
109109
clang-format --version
110110
find src -name '*.cpp' -o -name '*.h' | xargs clang-format --dry-run --Werror
111+
112+
lint-license:
113+
runs-on: ubuntu-latest
114+
steps:
115+
- name: 'Checkout Code'
116+
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
117+
118+
- name: 'Set up Go'
119+
uses: 'actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5' # ratchet:actions/setup-go@v5
120+
with:
121+
go-version: '1.24'
122+
cache: true
123+
124+
- name: 'Validate License Headers'
125+
shell: 'bash'
126+
run: |
127+
go run github.com/google/addlicense@v1.1.1 -check -s=only .

0 commit comments

Comments
 (0)