Skip to content

Commit

Permalink
Move test results schema v1 to pkg so we can use it in other go projects
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekthompson committed Jan 7, 2025
1 parent 4d096cb commit db089aa
Show file tree
Hide file tree
Showing 116 changed files with 123 additions and 123 deletions.
2 changes: 1 addition & 1 deletion cmd/captain/framework_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/spf13/cobra"

v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type frameworkParams struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/captain/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/rwx-research/captain-cli/internal/logging"
"github.com/rwx-research/captain-cli/internal/parsing"
"github.com/rwx-research/captain-cli/internal/providers"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

var mutuallyExclusiveParsers []parsing.Parser = []parsing.Parser{
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/local/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/rwx-research/captain-cli/internal/errors"
"github.com/rwx-research/captain-cli/internal/fs"
"github.com/rwx-research/captain-cli/internal/testing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/local/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/rwx-research/captain-cli/internal/backend/local"
"github.com/rwx-research/captain-cli/internal/fs"
"github.com/rwx-research/captain-cli/internal/mocks"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/remote/update_test_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/rwx-research/captain-cli/internal/backend"
"github.com/rwx-research/captain-cli/internal/errors"
"github.com/rwx-research/captain-cli/internal/fs"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

func (c Client) registerTestResults(
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/remote/update_test_results_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/rwx-research/captain-cli/internal/backend/remote"
"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/rwx-research/captain-cli/internal/testing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// Client is the interface of our API layer.
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/rwx-research/captain-cli/internal/config"
"github.com/rwx-research/captain-cli/internal/errors"
"github.com/rwx-research/captain-cli/internal/targetedretries"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// RunConfig holds the configuration for running a test suite (used by `RunSuite`)
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/rwx-research/captain-cli/internal/exec"
"github.com/rwx-research/captain-cli/internal/fs"
"github.com/rwx-research/captain-cli/internal/reporting"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// Reporter is a function that writes test results to a file. Different reporters implement different encodings.
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/rwx-research/captain-cli/internal/errors"
"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// Parse parses the files supplied in `filepaths` and prints them as formatted JSON to stdout.
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/rwx-research/captain-cli/internal/reporting"
"github.com/rwx-research/captain-cli/internal/targetedretries"
"github.com/rwx-research/captain-cli/internal/templating"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// RunSuite runs the specified build- or test-suite and optionally uploads the resulting test results file.
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/rwx-research/captain-cli/internal/mocks"
"github.com/rwx-research/captain-cli/internal/parsing"
"github.com/rwx-research/captain-cli/internal/targetedretries"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/mint/retry_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/rwx-research/captain-cli/internal/errors"
"github.com/rwx-research/captain-cli/internal/fs"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/mocks/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/rwx-research/captain-cli/internal/backend"
"github.com/rwx-research/captain-cli/internal/errors"
"github.com/rwx-research/captain-cli/internal/testing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// API is a mocked implementation of 'backend.Client'.
Expand Down
2 changes: 1 addition & 1 deletion internal/mocks/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// Parser is a mocked implementation of 'parsing.Parser'.
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/dot_net_xunit_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type DotNetxUnitParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/dot_net_xunit_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/elixir_exunit_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type ElixirExUnitParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/elixir_exunit_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/go_ginkgo_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
ginkgo "github.com/onsi/ginkgo/v2/types"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type GoGinkgoParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/go_ginkgo_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/go_test_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type GoTestParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/go_test_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_cucumber_json_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type JavaScriptCucumberJSONParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_cucumber_json_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_cypress_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// Parses https://github.com/michaelleeallen/mocha-junit-reporter
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_cypress_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_jest_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type JavaScriptJestParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_jest_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_karma_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/mileusna/useragent"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

// Parses https://github.com/douglasduteil/karma-json-reporter
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_karma_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_mocha_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type JavaScriptMochaParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_mocha_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_playwright_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type JavaScriptPlaywrightParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_playwright_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_vitest_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type JavaScriptVitestParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/javascript_vitest_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/junit_testsuite_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type JUnitTestsuiteParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/junit_testsuite_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/junit_testsuites_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/rwx-research/captain-cli/internal/errors"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type JUnitTestsuitesParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/junit_testsuites_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/bradleyjkemp/cupaloy"

"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/rwx-research/captain-cli/internal/errors"
"github.com/rwx-research/captain-cli/internal/fs"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/rwx-research/captain-cli/internal/errors"
"github.com/rwx-research/captain-cli/internal/mocks"
"github.com/rwx-research/captain-cli/internal/parsing"
v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/parsing/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package parsing
import (
"io"

v1 "github.com/rwx-research/captain-cli/internal/testingschema/v1"
v1 "github.com/rwx-research/captain-cli/pkg/testresultsschema/v1"
)

type Parser interface {
Expand Down
Loading

0 comments on commit db089aa

Please sign in to comment.