[create-pull-request] automated change #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |