Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add linter to github actions
Browse files Browse the repository at this point in the history
simar7 committed Jan 23, 2025
1 parent afd8c6a commit ea83d94
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -111,24 +111,43 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Lint
id: lint
uses: golangci/golangci-lint-action@v6.1.1
with:
version: v1.61
args: --verbose --out-format=line-number
if: matrix.operating-system == 'ubuntu-latest'

- name: Check if linter failed
run: |
echo "Linter failed, running 'mage lint:fix' might help to correct some errors"
exit 1
if: ${{ failure() && steps.lint.conclusion == 'failure' }}

- name: Install tools
uses: aquaproj/aqua-installer@v3.1.0
with:
aqua_version: v1.25.0

- name: Setup Kubernetes cluster (KIND)
uses: engineerd/setup-kind@v0.6.2
with:
version: ${{ env.KIND_VERSION }}
image: ${{ env.KIND_IMAGE }}

- name: Test connection to Kubernetes cluster
run: |
kubectl cluster-info
kubectl wait --for=condition=Ready nodes --all --timeout=300s
kubectl describe node
- name: Run integration tests
run: |
kubectl create -k deploy/static
@@ -137,10 +156,12 @@ jobs:
KUBECONFIG: /home/runner/.kube/config
OPERATOR_NAMESPACE: trivy-system
OPERATOR_TARGET_NAMESPACES: default

- name: Upload code coverage
uses: codecov/codecov-action@v5
with:
files: ./itest/trivy-operator/coverage.txt

e2e-testing:
name: Run end to end testing
needs:

0 comments on commit ea83d94

Please sign in to comment.