Skip to content

add dotular init

add dotular init #9

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.22', '1.23']
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Download dependencies
run: go mod download
- name: Build
run: go build ./...
- name: Run tests
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Check coverage
run: |
total=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
echo "Total coverage: ${total}%"
threshold=80
if [ "$(echo "$total < $threshold" | bc -l)" -eq 1 ]; then
echo "::error::Coverage ${total}% is below ${threshold}% threshold"
exit 1
fi
- name: Vet
run: go vet ./...