Skip to content

Commit

Permalink
add go license header check in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-perugini committed May 17, 2023
1 parent 1975070 commit b7ce834
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/check-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,41 @@ jobs:
- name: Check whether any tidying was needed
run: git diff --color --exit-code

check-license-headers:
name: check-license-headers (${{ matrix.module.path }})
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
module:
- path: ./

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Check license headers
env:
GO_MODULE_PATH: ${{ matrix.module.path }}
run: |
task go:check-license-headers
git diff --color --exit-code
# Do a simple "smoke test" build for the modules with no other form of validation
build:
name: build (${{ matrix.module.path }})
Expand Down

0 comments on commit b7ce834

Please sign in to comment.