Skip to content

docs: remove sonar cloud badge (#94) #95

docs: remove sonar cloud badge (#94)

docs: remove sonar cloud badge (#94) #95

Workflow file for this run

---
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
permissions:
contents: write
on:
workflow_dispatch:
push:
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [oldstable, stable]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build -v ./...
- name: Test
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
- name: Run examples
run: make run-all
working-directory: ./examples
- name: check test coverage
if: matrix.os == 'ubuntu-latest' && matrix.go == 'stable'
uses: vladopajic/go-test-coverage@a93b868a4cbcbf18dc3781650fad241f0020e609 # v2.18.8
continue-on-error: true
with:
config: ./.github/.testcoverage.yml
## when token is not specified (value '') this feature is turned off
## in this example badge is created and committed only for main branch
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }}
## name of branch where badges are stored
## ideally this should be orphan branch (see below how to create this branch)
git-branch: badges