Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include go mod vendor to resolve licensei detection failures #907

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,17 @@ jobs:
GITHUB_TOKEN: ${{ github.token }} # Note: this is required for licensei auth in steps to avoid rate-limiting.
run: ./bin/licensei list

- name: Vendor dependencies to retrieve licenses locally
# Vendor deps before running https://github.com/goph/licensei
# to avoid false-positive when modules github repo could not be determined
run: go mod vendor -o vendor

- name: Check dependency licenses
env:
GITHUB_TOKEN: ${{ github.token }} # Note: this is required for licensei auth in steps to avoid rate-limiting.
run: make license-check
run: |
make license-check
make vendor-clean
- name: Run unit tests, linter, etc.
run: make check
Expand Down
3 changes: 2 additions & 1 deletion .licensei.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ ignored = [

[header]
ignorePaths = [
"build"
"build",
"vendor"
]

ignoreFiles = [
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ license-check: bin/licensei ## Run license check
license-cache: bin/licensei ## Generate license cache
bin/licensei cache

.PHONY: vendor-clean
vendor-clean: ## Clean vendor cache
rm -rf ${PWD}/vendor

# Run tests
.PHONY: test
test: install-envtest
Expand Down