Skip to content

ci: renaming to ci

ci: renaming to ci #1

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: write-all
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@v6
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build -v ./...
- name: Test
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
- name: check test coverage
if: matrix.os == 'ubuntu-latest' && matrix.go == 'stable'
uses: vladopajic/go-test-coverage@v2
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