workflow update

This commit is contained in:
sandeep
2023-02-21 19:35:48 +05:30
parent 6d11f6fadf
commit c493f2ff15
4 changed files with 4 additions and 43 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
name: 🔨 Build Test
on:
pull_request:
workflow_dispatch:
@@ -14,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Check out code
uses: actions/checkout@v3
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
with:
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v3
-40
View File
@@ -1,40 +0,0 @@
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
working-directory: v2/
run: |
go test -coverprofile=./cov.out ./...
- name: Run Gosec Security Scanner
working-directory: v2/
run: |
go install github.com/securego/gosec/cmd/gosec@latest
gosec -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 }}