Skip to content

Updated User-Agent to "Gemfury CLI …" #93

Updated User-Agent to "Gemfury CLI …"

Updated User-Agent to "Gemfury CLI …" #93

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Download modules
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: Run tests
run: go test -coverprofile coverage.out ./...
- name: Check code coverage
run: |
go tool cover -func coverage.out | grep total | \
awk '{ if (70 <= substr($3, 1, length($3)-1)) { \
print("Coverage: " $3, "OK"); \
} else { \
print("Coverage: " $3, "FAIL"); \
exit(1) \
}}'