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 15, 2023
1 parent 5f676b9 commit a33b1bb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/check-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,42 @@ 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

- name: Check formatting
run: 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 a33b1bb

Please sign in to comment.