diff --git a/yaml/converter/legacy/internal/testdata/matrix_1.yml b/yaml/converter/legacy/internal/testdata/matrix_1.yml new file mode 100644 index 0000000..77e3331 --- /dev/null +++ b/yaml/converter/legacy/internal/testdata/matrix_1.yml @@ -0,0 +1,19 @@ + +pipeline: + test: + image: golang:${GO_VERSION} + commands: + - go test -v ./... + +services: + redis: + image: redis:2.6 + +matrix: + include: + - GO_VERSION: 1.11 + REDIS_VERSION: 2.6 + - GO_VERSION: 1.10 + REDIS_VERSION: 2.6 + - GO_VERSION: 1.9 + REDIS_VERSION: 2.6 diff --git a/yaml/converter/legacy/internal/testdata/matrix_1.yml.golden b/yaml/converter/legacy/internal/testdata/matrix_1.yml.golden new file mode 100644 index 0000000..a78c2a6 --- /dev/null +++ b/yaml/converter/legacy/internal/testdata/matrix_1.yml.golden @@ -0,0 +1,61 @@ +--- +kind: pipeline +name: matrix-1 + +platform: + os: linux + arch: amd64 + +steps: +- name: test + pull: default + image: golang:1.11 + commands: + - go test -v ./... + +services: +- name: redis + pull: default + image: redis:2.6 + +--- +kind: pipeline +name: matrix-2 + +platform: + os: linux + arch: amd64 + +steps: +- name: test + pull: default + image: golang:1.10 + commands: + - go test -v ./... + +services: +- name: redis + pull: default + image: redis:2.6 + +--- +kind: pipeline +name: matrix-3 + +platform: + os: linux + arch: amd64 + +steps: +- name: test + pull: default + image: golang:1.9 + commands: + - go test -v ./... + +services: +- name: redis + pull: default + image: redis:2.6 + +... diff --git a/yaml/converter/legacy/internal/testdata/matrix_2.yml b/yaml/converter/legacy/internal/testdata/matrix_2.yml new file mode 100644 index 0000000..58ba6a5 --- /dev/null +++ b/yaml/converter/legacy/internal/testdata/matrix_2.yml @@ -0,0 +1,19 @@ + +pipeline: + test: + image: golang:${GO_VERSION} + commands: + - go test -v ./... + +services: + redis: + image: redis:${REDIS_VERSION} + +matrix: + GO_VERSION: + - 1.11 + - 1.10 + + REDIS_VERSION: + - 2.6 + - 2.8 diff --git a/yaml/converter/legacy/internal/testdata/matrix_2.yml.golden b/yaml/converter/legacy/internal/testdata/matrix_2.yml.golden new file mode 100644 index 0000000..609709d --- /dev/null +++ b/yaml/converter/legacy/internal/testdata/matrix_2.yml.golden @@ -0,0 +1,81 @@ +--- +kind: pipeline +name: matrix-1 + +platform: + os: linux + arch: amd64 + +steps: +- name: test + pull: default + image: golang:1.11 + commands: + - go test -v ./... + +services: +- name: redis + pull: default + image: redis:2.6 + +--- +kind: pipeline +name: matrix-2 + +platform: + os: linux + arch: amd64 + +steps: +- name: test + pull: default + image: golang:1.11 + commands: + - go test -v ./... + +services: +- name: redis + pull: default + image: redis:2.8 + +--- +kind: pipeline +name: matrix-3 + +platform: + os: linux + arch: amd64 + +steps: +- name: test + pull: default + image: golang:1.10 + commands: + - go test -v ./... + +services: +- name: redis + pull: default + image: redis:2.6 + +--- +kind: pipeline +name: matrix-4 + +platform: + os: linux + arch: amd64 + +steps: +- name: test + pull: default + image: golang:1.10 + commands: + - go test -v ./... + +services: +- name: redis + pull: default + image: redis:2.8 + +...