Skip to content

Fixes for login and .netrc bugs #69

Fixes for login and .netrc bugs

Fixes for login and .netrc bugs #69

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@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Cache modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- 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) \
}}'