Files
projectdiscovery-httpx/.github/workflows/sonarcloud.yml
T
Mzack9999 32930d2cc6 Using scanme.sh in functional tests + Fixing gosec action error (#667)
* Using scanme.sh in functional tests

* using gosec action
2022-06-27 13:38:11 +05:30

38 lines
965 B
YAML

name: 👮🏼‍♂️ Sonarcloud
on:
push:
branches:
- master
- dev
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: "Set up Go"
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run unit Tests
run: |
go test -coverprofile=./cov.out ./...
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: '-no-fail -fmt=sonarqube -out report.json ./...'
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}