(docs) README updated #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
push: | |
tags-ignore: | |
- '**' | |
branches: | |
- '**' | |
name: "Cover It Up" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
coveritup: | |
strategy: | |
matrix: | |
go-version: [mod] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: kevincobain2000/action-gobrew@v2 | |
with: | |
version: ${{ matrix.go-version }} | |
- name: Install Tools | |
run: | | |
go install github.com/securego/gosec/v2/cmd/gosec@latest | |
go install github.com/axw/gocov/gocov@latest | |
go install github.com/AlekSi/gocov-xml@latest | |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | |
curl -sLk https://raw.githubusercontent.com/kevincobain2000/cover-totalizer/master/install.sh | sh | |
- run: go mod tidy | |
- name: Lint Errors | |
uses: kevincobain2000/action-coveritup@v2 | |
with: | |
type: go-lint-errors | |
command: golangci-lint run ./... | grep -c "\^" | |
- name: Test | |
uses: kevincobain2000/action-coveritup@v2 | |
with: | |
type: go-test-run-time | |
command: go test -race -v ./... -count=1 -coverprofile=coverage.out | |
record: runtime | |
- name: Test | |
uses: kevincobain2000/action-coveritup@v2 | |
with: | |
type: go-build-time | |
command: go build | |
record: runtime | |
- name: Coverage | |
run: gocov convert coverage.out | gocov-xml > coverage.xml | |
- name: Coveritup | |
uses: kevincobain2000/action-coveritup@v2 | |
with: | |
type: coverage | |
command: ./cover-totalizer coverage.xml | |
- name: Number of dependencies | |
uses: kevincobain2000/action-coveritup@v2 | |
with: | |
type: go-mod-dependencies | |
command: go list -m all|wc -l|awk '{$1=$1};1' | |
- uses: kevincobain2000/action-coveritup@v2 | |
with: | |
pr_comment: true | |
- uses: kevincobain2000/action-coveritup@v2 | |
with: | |
pr_comment: true |