Skip to content

5458 task: [KIUWAN] Resolve golium vulnerabilities #341

5458 task: [KIUWAN] Resolve golium vulnerabilities

5458 task: [KIUWAN] Resolve golium vulnerabilities #341

Workflow file for this run

name: Code Analysis
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
env:
GOLANGCI_LINT_VERSION: v1.52.2
jobs:
analysis:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Test
run: go test -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v test/acceptance` -json > test-report.out
- name: Coverage to Codecov
uses: codecov/[email protected]
- name: Golangci increment
if: "!contains(github.ref, 'master')"
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin $GOLANGCI_LINT_VERSION
golangci-lint run -c .golangci.yml --timeout 5m --new-from-rev origin/master
- name: Golangci main
if: contains(github.ref, 'master')
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin $GOLANGCI_LINT_VERSION
golangci-lint run -c .golangci.yml --timeout 5m
- name: SonarCloud Scan
if: always()
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}