Skip to content

Add certificates_checked_total metric #50

Add certificates_checked_total metric

Add certificates_checked_total metric #50

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Lint and Test
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a # v21
- name: Setup Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
- name: Run Checks (lint, vet, test)
run: nix develop --command check
- name: Generate Coverage Report
run: nix develop --command test-coverage
- name: Extract Coverage Data
if: github.event_name == 'pull_request'
id: coverage
run: |
{
echo 'report<<EOF'
nix develop --command go tool cover -func=coverage.out | tail -1
echo 'EOF'
} >> "$GITHUB_OUTPUT"
{
echo 'details<<EOF'
nix develop --command go tool cover -func=coverage.out
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Post Coverage Comment
if: github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1
with:
header: coverage
message: |
## Code Coverage Report
**Total Coverage:** `${{ steps.coverage.outputs.report }}`
<details>
<summary>Coverage by function</summary>
```
${{ steps.coverage.outputs.details }}
```
</details>
- name: Build Binaries
run: nix develop --command build