Skip to content

Commit e6cc3f2

Browse files
committed
ci: add check for license headers
This checks that license headers are present in files. It also captures the case where a different license is added, as REUSE requires them to be present in `LICENSES` directory. Signed-off-by: Gary Guo <gary@garyguo.net>
1 parent 960574e commit e6cc3f2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
with:
2323
fetch-depth: ${{github.event.pull_request.commits}}
2424
ref: ${{github.event.pull_request.head.sha}}
25+
# Packages in ubuntu-latest can be old. Use nix to source newer tools.
26+
- uses: cachix/install-nix-action@v31
27+
with:
28+
github_access_token: ${{ github.token }}
2529
- uses: dtolnay/rust-toolchain@v1
2630
with:
2731
toolchain: nightly
@@ -38,6 +42,8 @@ jobs:
3842
git rebase --exec \
3943
'git log --no-merges -1 --pretty=format:%B | grep -q "^Signed-off-by:"' \
4044
--root
45+
- name: License Header Check
46+
run: git rebase --exec 'nix run nixpkgs#reuse lint' --root
4147
- name: Format Check
4248
run: git rebase --exec 'cargo fmt --check --all' --root
4349
- name: Documentation Build and Link Heartbeat Check

0 commit comments

Comments
 (0)