Skip to content

Commit

Permalink
Update ci-go-cover.yml (#404)
Browse files Browse the repository at this point in the history
Reduced min coverage to 96% (was 98%) since the Diagnose()
and DiagnoseFirst() functions reduced code coverage because
of error path .

These two functions return diagnostic notation for debugging,
so CBOR encoding/decoding funcs are unaffected (still >= 98% coverage).

Added triggers:
- pull_request
- workflow_dispatch

Co-authored-by: Faye Amacker <33205765+fxamacker@users.noreply.github.com>
  • Loading branch information
x448 and fxamacker authored May 15, 2023
1 parent 92d0a5a commit 32a24cd
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/ci-go-cover.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2020-present Montgomery Edwards⁴⁴⁸ (github.com/x448).
# Copyright 2020-2023 Montgomery Edwards⁴⁴⁸ (github.com/x448).
# This file is licensed under the MIT License. See LICENSE at https://github.com/x448/workflows for the full text.
#
# CI Go Cover 2020.1.28.
# CI Go Cover 2023.5.14.
# This GitHub Actions workflow checks if Go (Golang) code coverage satisfies the required minimum.
# The required minimum is specified in the workflow name to keep badge.svg and verified minimum in sync.
#
Expand All @@ -14,12 +14,17 @@
# 1. Change workflow name from "cover 100%" to "cover ≥92.5%". Script will automatically use 92.5%.
# 2. Update README.md to use the new path to badge.svg because the path includes the workflow name.

name: cover ≥98%
name: cover ≥96%

# Remove default permissions.
permissions: {}

on: [push]
on:
workflow_dispatch:
pull_request:
push:
branches: [main, master]

jobs:

# Verify minimum coverage is reached using `go test -short -cover` on latest-ubuntu with default version of Go.
Expand All @@ -36,7 +41,9 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: 1.19
check-latest: true
check-latest: true
- name: Install x448/float16
run: go get github.com/x448/float16@v0.8.4
- name: Go Coverage
run: |
go version
Expand Down

0 comments on commit 32a24cd

Please sign in to comment.