Skip to content

Commit

Permalink
Include go mod vendor to resolve licensei detection failures
Browse files Browse the repository at this point in the history
  • Loading branch information
nishantapatil3 committed Mar 7, 2023
1 parent 16d9569 commit 1d2d06a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
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

0 comments on commit 1d2d06a

Please sign in to comment.