1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/.github/workflows/parse_integration_test_list.go
Alexey Matvievsky 2dfca180a7
(feat) Golang integration tests dynamic workflow
* Dynamic version detection of Golang 

* Dynamic Golang integration tests run matrix

* Golang timeout to build set at 5 min

* Golang integration test timeout to run set at 10 min

* Consumer tests timeout set at 20 min

Co-authored-by: Alexey Matvievsky <alexey.matvievsky@sap.com>
2022-09-22 19:12:13 +02:00

22 lines
431 B
Go

package main
import (
"encoding/json"
"flag"
"fmt"
"github.com/ghodss/yaml"
"os"
)
func main() {
file := flag.String("file", "../../integration/github_actions_integration_test_list.yml", "Tests to be executed")
flag.Parse()
f, _ := os.ReadFile(*file)
var Matrix struct {
Run interface{} `json:"run,omitempty" yaml:"run"`
}
yaml.Unmarshal(f, &Matrix)
output, _ := json.Marshal(Matrix)
fmt.Println(string(output))
}