Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
m00g3n committed Feb 20, 2024
1 parent 424b851 commit 2caed23
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/lint-compass-runtime-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ name: Run golangci-lint on compass-runtime-agent
on:
push:
paths:
- '$LINTER_WORKING_DIRECTORY/**'
- 'components/compass-runtime-agent/**'
branches: [ "main" ]
pull_request:
paths:
- '$LINTER_WORKING_DIRECTORY/**'
- 'components/compass-runtime-agent/**'

jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- name: lint
uses:
- .github/workflows/lint-template/template/golangci-lint
- uses: actions/checkout@v4
- uses: ./.github/workflows/template/golangci-lint
with:
GO_VERSION: '1.21'
LINTER_VERSION: v1.56.2
LINTER_WORKING_DIRECTORY: 'components/compass-runtime-agent'

15 changes: 11 additions & 4 deletions .github/workflows/template/golangci-lint/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: golangci-lint template

inputs:
GO_VERSION:
required: true
LINTER_VERSION:
required: true
LINTER_WORKING_DIRECTORY:
required: true

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
Expand All @@ -10,21 +18,20 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '${{ inputs.GO_VERSION }}'
go-version: ${{ inputs.GO_VERSION }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: '${{ inputs.LINTER_VERSION }}'
version: ${{ inputs.LINTER_VERSION }}

# Optional: working directory, useful for monorepos
working-directory: '${{ inputs.LINTER_WORKING_DIRECTORY }}'
working-directory: ${{ inputs.LINTER_WORKING_DIRECTORY }}

# Optional: golangci-lint command line arguments.
#
Expand Down
1 change: 1 addition & 0 deletions components/compass-runtime-agent/internal/kyma/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/kyma-project/kyma/components/compass-runtime-agent/internal/apperrors"
)


func newResult(application v1alpha1.Application, applicationID string, operation Operation, appError apperrors.AppError) Result {
return Result{
ApplicationName: application.Name,
Expand Down

0 comments on commit 2caed23

Please sign in to comment.