61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "~1.17"
|
|
- run: go test -race -coverprofile=coverage.out ./...
|
|
- uses: codecov/codecov-action@v2
|
|
with:
|
|
files: coverage.out
|
|
- uses: SonarSource/sonarcloud-github-action@master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
build:
|
|
name: Build
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "~1.17"
|
|
- run: go build ./cmd/changeloguru
|
|
golangci-lint:
|
|
name: golangci-lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: golangci/golangci-lint-action@v2
|
|
with:
|
|
version: latest
|
|
semgrep:
|
|
name: semgrep
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: returntocorp/semgrep-action@v1
|
|
with:
|
|
config: >-
|
|
p/security-audit
|
|
p/secrets
|
|
p/golang
|