Skip to content

[create-pull-request] automated change #139

[create-pull-request] automated change

[create-pull-request] automated change #139

Workflow file for this run

name: test coverage
on: [push]
jobs:
testcoverage:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install nix
uses: nixbuild/nix-quick-install-action@v29
with:
nix_conf: experimental-features = nix-command flakes
- name: Start postgres database
run: |
nix develop --command \
pgnix-init
- name: Run gotests
run: |
nix develop --command \
go test -v ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
- name: Check test coverage
uses: vladopajic/go-test-coverage@v2
with:
profile: cover.out
local-prefix: github.com/storvik/goshrt
threshold-file: 0 # setting to 0, should be increased
threshold-package: 0 # setting to 0, should be increased
threshold-total: 60 # 60 % is a nice starting point, must increase this
git-token: ${{ github.ref_name == 'master' && secrets.GITHUB_TOKEN || '' }}
git-branch: badges