changeloguru/.github/workflows/go.yaml

61 lines
1.4 KiB
YAML
Raw Normal View History

name: Go
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-11-06 07:05:55 +00:00
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
2021-08-18 17:53:26 +00:00
go-version: "~1.17"
2021-08-20 18:02:43 +00:00
- run: go test -race -coverprofile=coverage.out ./...
- uses: codecov/codecov-action@v2
with:
files: coverage.out
2021-11-06 07:05:55 +00:00
- uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2021-03-29 07:26:44 +00:00
build:
2021-03-18 10:15:20 +00:00
name: Build
2021-03-29 07:26:44 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
2021-08-18 17:53:26 +00:00
go-version: "~1.17"
- run: go build ./cmd/changeloguru
2021-11-06 07:05:55 +00:00
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