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: 0

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