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

build: add license header check #375

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
25 changes: 20 additions & 5 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,22 @@ concurrency:
cancel-in-progress: true

jobs:


verify-license-headers:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: "Check for files without a license header"
run: |-
# checks all java, yaml, kts and sql files for an Apache 2.0 license header
cmd="grep -riL \"SPDX-License-Identifier: Apache-2.0\" --include=\*.{java,yaml,yml,kts,sql} --exclude-dir={.gradle,\*\openapi} ."
violations=$(eval $cmd | wc -l)
if [[ $violations -ne 0 ]] ; then
echo "$violations files without license headers were found:";
eval $cmd;
exit 1;
fi

verify-formatting:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -71,7 +86,7 @@ jobs:

unit-tests:
runs-on: ubuntu-latest
needs: [ verify-formatting ]
needs: [ verify-formatting, verify-license-headers ]
steps:
- uses: actions/[email protected]

Expand All @@ -82,7 +97,7 @@ jobs:

integration-tests:
runs-on: ubuntu-latest
needs: [ verify-formatting ]
needs: [ verify-formatting, verify-license-headers ]
steps:
- uses: actions/[email protected]

Expand All @@ -93,7 +108,7 @@ jobs:

api-tests:
runs-on: ubuntu-latest
needs: [ verify-formatting ]
needs: [ verify-formatting, verify-license-headers ]
steps:
- uses: actions/[email protected]

Expand All @@ -104,7 +119,7 @@ jobs:

end-to-end-tests:
runs-on: ubuntu-latest
needs: [ verify-formatting ]
needs: [ verify-formatting, verify-license-headers ]
steps:
- uses: actions/[email protected]

Expand Down

This file was deleted.

This file was deleted.