Skip to content

Commit

Permalink
chore: fix license, add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Telemaco019 committed May 19, 2024
1 parent bf4f3f2 commit e075be8
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI Pipeline

on:
workflow_dispatch:
pull_request:
branches:
- "main"
push:
branches:
- "main"
paths-ignore:
- ".github/**"
- "*.md"
- "docs/**"
- "LICENSE"
- "Makefile"

jobs:

Check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.3
cache: true

- name: Check license header
uses: apache/[email protected]

- name: Lint
uses: golangci/golangci-lint-action@v6

- name: Test
shell: bash
run: make test
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ license-check: license-eye ## Check all files have the license header
license-fix: license-eye ## Add license header to files that still don't have it
$(LICENSE_EYE) header fix

.PHONY: test
test: ## Run tests.
go test -v ./...

.PHONY: check
check: fmt vet lint license-check ## Check the code
check: fmt vet test license-check ## Check the code


##@ Build
Expand Down
16 changes: 16 additions & 0 deletions pkg/cmd/flags/constants.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2024 Michele Zanotti <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package flags

const (
Expand Down
16 changes: 16 additions & 0 deletions pkg/utils/kubernetes.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2024 Michele Zanotti <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package utils

import (
Expand Down

0 comments on commit e075be8

Please sign in to comment.