• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fogfish / iq / 19150632324

06 Nov 2025 09:35PM UTC coverage: 40.252%. First build
19150632324

Pull #26

github

fogfish
improve ci/cd auto versioning
Pull Request #26: Compose AI workflow within the shell

1095 of 2628 new or added lines in 34 files covered. (41.67%)

1119 of 2780 relevant lines covered (40.25%)

0.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.5
/internal/progress/context.go
1
//
2
// Copyright (C) 2025 Dmitry Kolesnikov
3
//
4
// This file may be modified and distributed under the terms
5
// of the MIT license.  See the LICENSE file for details.
6
// https://github.com/fogfish/iq
7
//
8

9
package progress
10

11
import "context"
12

13
// Context keys - using plain strings to allow cross-package access
14
const (
15
        reporterKey = "iq.progress.reporter"
16
        stepInfoKey = "iq.progress.stepinfo"
17
)
18

19
// StepInfo carries information about the current step execution
20
type StepInfo struct {
21
        JobName    string
22
        StepName   string
23
        StepNum    int
24
        TotalSteps int
25
}
26

27
// WithReporter embeds a progress reporter in the context
28
func WithReporter(ctx context.Context, reporter *Reporter) context.Context {
1✔
29
        return context.WithValue(ctx, reporterKey, reporter)
1✔
30
}
1✔
31

32
// FromContext extracts the progress reporter from context
33
func FromContext(ctx context.Context) *Reporter {
1✔
34
        if reporter, ok := ctx.Value(reporterKey).(*Reporter); ok {
2✔
35
                return reporter
1✔
36
        }
1✔
NEW
37
        return nil
×
38
}
39

40
// WithStepInfo embeds step information in the context
41
func WithStepInfo(ctx context.Context, info StepInfo) context.Context {
1✔
42
        return context.WithValue(ctx, stepInfoKey, info)
1✔
43
}
1✔
44

45
// GetStepInfo extracts step information from context
46
func GetStepInfo(ctx context.Context) *StepInfo {
1✔
47
        if info, ok := ctx.Value(stepInfoKey).(StepInfo); ok {
2✔
48
                return &info
1✔
49
        }
1✔
NEW
50
        return nil
×
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc