Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Merge pull request #46 from rehabaam/feat/add-coverage #114

Merge pull request #46 from rehabaam/feat/add-coverage

Merge pull request #46 from rehabaam/feat/add-coverage #114

Workflow file for this run

name: Go
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.20
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
# Sonar cloud scan for TDBackend project
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.SQGH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# Get Project dependencies
- name: Get dependencies
run: |
if [ -f go.mod ]; then
go mod tidy
go mod verify
go get github.com/ory/go-acc
go get github.com/mattn/goveralls
fi
Get Project dependencies

Check failure on line 47 in .github/workflows/go.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/go.yml

Invalid workflow file

You have an error in your yaml syntax on line 47
- name: Create Coverage report
run: |
go install github.com/ory/go-acc@latest
go-acc -o coverage.out ./... -- -timeout 30m
- name: Code coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ github.workspace }}/coverage.out
# GoSec security scanner
- name: Run Gosec Security Scanner
run: |
go install github.com/securego/gosec/v2/cmd/gosec@latest
gosec ./...
- name: Build
run: go build -v .
- name: Test
run: go test -v .