ci

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ci provides CI/CD integration tools for PSL projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatResults

func FormatResults(results []ValidationResult) string

FormatResults formats validation results for CI output.

func GenerateJUnitXML

func GenerateJUnitXML(results []ValidationResult) (string, error)

GenerateJUnitXML generates JUnit XML from validation results.

func GitHubActionsTemplate

func GitHubActionsTemplate() string

GitHubActionsTemplate returns a GitHub Actions workflow template.

Types

type Failure

type Failure struct {
	Message string `xml:"message,attr"`
	Type    string `xml:"type,attr"`
	Body    string `xml:",chardata"`
}

Failure represents a test failure.

type TestCase

type TestCase struct {
	Name    string   `xml:"name,attr"`
	Time    float64  `xml:"time,attr"`
	Failure *Failure `xml:"failure,omitempty"`
}

TestCase represents a JUnit XML test case.

type TestSuite

type TestSuite struct {
	XMLName  xml.Name   `xml:"testsuite"`
	Name     string     `xml:"name,attr"`
	Tests    int        `xml:"tests,attr"`
	Failures int        `xml:"failures,attr"`
	Time     float64    `xml:"time,attr"`
	Cases    []TestCase `xml:"testcase"`
}

TestSuite represents a JUnit XML test suite.

type ValidationResult

type ValidationResult struct {
	File    string        `json:"file"`
	Valid   bool          `json:"valid"`
	Error   string        `json:"error,omitempty"`
	Elapsed time.Duration `json:"elapsed"`
}

ValidationResult holds the result of validating a PSL file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL