Skip to content

Commit b926c28

Browse files
PicazsooCopilot
andcommitted
fix: correct 11 workflow conversion bugs in compute-matrix refactor
Bug 1 - 80:8080 in all_samples (5 workflows): crystal, groovy, powershell, r, scala-client - Remove port-mapping string from sample-list input - Add petstore-api service container to build job Bug 2 - single-quoted paths in all_samples (3 workflows): c-libcurl-client, ocaml, protobuf - Remove surrounding single-quotes so grep matching works - Remove trailing slashes (normalised by compute-matrix anyway) Bug 3 - python version literals in all_samples (3 workflows): postman, python-client-echo-api, python-pydantic-v1-client-echo-api - Move version strings to static python-version: matrix dimension - Switch to samples output from compute-matrix for sample: dimension - Update if: guard to check needs.setup.outputs.samples != '[]' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fcbc9a4 commit b926c28

11 files changed

Lines changed: 84 additions & 43 deletions

.github/workflows/samples-c-libcurl-client.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ jobs:
3030
# Action inputs don't support arrays, so this is a newline-delimited string parsed in the action script.
3131
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
3232
all_samples: |
33-
'samples/client/petstore/c/'
34-
'samples/client/petstore/c-useJsonUnformatted/'
35-
'samples/client/others/c/bearerAuth/'
33+
samples/client/petstore/c
34+
samples/client/petstore/c-useJsonUnformatted
35+
samples/client/others/c/bearerAuth
3636
3737
build:
3838
name: Build c libcurl client

.github/workflows/samples-crystal.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
# Action inputs don't support arrays, so this is a newline-delimited string parsed in the action script.
2626
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
2727
all_samples: |
28-
samples/client/petstore/crystal/
29-
80:8080
28+
samples/client/petstore/crystal
3029
3130
build:
3231
name: Build Crystal projects
@@ -36,6 +35,14 @@ jobs:
3635
strategy:
3736
fail-fast: false
3837
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
38+
services:
39+
petstore-api:
40+
image: swaggerapi/petstore
41+
ports:
42+
- 80:8080
43+
env:
44+
SWAGGER_HOST: http://petstore.swagger.io
45+
SWAGGER_BASE_PATH: /v2
3946
steps:
4047
- uses: actions/checkout@v5
4148
- name: Install Crystal

.github/workflows/samples-groovy.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
3131
all_samples: |
3232
samples/client/petstore/groovy
33-
80:8080
3433
3534
build:
3635
name: Build Groovy
@@ -40,6 +39,14 @@ jobs:
4039
strategy:
4140
fail-fast: false
4241
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
42+
services:
43+
petstore-api:
44+
image: swaggerapi/petstore
45+
ports:
46+
- 80:8080
47+
env:
48+
SWAGGER_HOST: http://petstore.swagger.io
49+
SWAGGER_BASE_PATH: /v2
4350
steps:
4451
- uses: actions/checkout@v5
4552
- uses: actions/setup-java@v5

.github/workflows/samples-ocaml.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636
# Action inputs don't support arrays, so this is a newline-delimited string parsed in the action script.
3737
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
3838
all_samples: |
39-
'samples/client/petstore/ocaml/'
40-
'samples/client/petstore/ocaml-fake-petstore/'
41-
'samples/client/petstore/ocaml-oneOf-primitive/'
42-
'samples/client/petstore/ocaml-additional-properties/'
43-
'samples/client/petstore/ocaml-enum-in-composed-schema/'
44-
'samples/client/petstore/ocaml-recursion-test/'
39+
samples/client/petstore/ocaml
40+
samples/client/petstore/ocaml-fake-petstore
41+
samples/client/petstore/ocaml-oneOf-primitive
42+
samples/client/petstore/ocaml-additional-properties
43+
samples/client/petstore/ocaml-enum-in-composed-schema
44+
samples/client/petstore/ocaml-recursion-test
4545
4646
build:
4747
name: Build OCaml

.github/workflows/samples-postman.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
setup:
1212
runs-on: ubuntu-latest
1313
outputs:
14-
matrix: ${{ steps.filter.outputs.matrix }}
14+
samples: ${{ steps.filter.outputs.samples }}
1515
steps:
1616
- uses: actions/checkout@v5
1717
with:
@@ -24,16 +24,18 @@ jobs:
2424
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
2525
all_samples: |
2626
samples/schema/postman-collection
27-
"3.12"
2827
2928
build:
3029
name: Test Python client
3130
needs: setup
32-
if: ${{ needs.setup.outputs.matrix != '[]' }}
31+
if: ${{ needs.setup.outputs.samples != '[]' }}
3332
runs-on: ubuntu-latest
3433
strategy:
3534
fail-fast: false
36-
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
35+
matrix:
36+
python-version:
37+
- "3.12"
38+
sample: ${{ fromJson(needs.setup.outputs.samples) }}
3739
steps:
3840
- uses: actions/checkout@v5
3941
- uses: actions/setup-python@v6

.github/workflows/samples-powershell.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
# Action inputs don't support arrays, so this is a newline-delimited string parsed in the action script.
2626
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
2727
all_samples: |
28-
samples/client/petstore/powershell/
29-
80:8080
28+
samples/client/petstore/powershell
3029
3130
build:
3231
needs: setup
@@ -36,6 +35,14 @@ jobs:
3635
strategy:
3736
fail-fast: false
3837
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
38+
services:
39+
petstore-api:
40+
image: swaggerapi/petstore
41+
ports:
42+
- 80:8080
43+
env:
44+
SWAGGER_HOST: http://petstore.swagger.io
45+
SWAGGER_BASE_PATH: /v2
3946
steps:
4047
- uses: actions/checkout@v5
4148
- name: Build the client

.github/workflows/samples-protobuf.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
# Action inputs don't support arrays, so this is a newline-delimited string parsed in the action script.
2929
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
3030
all_samples: |
31-
'samples/config/petstore/protobuf-schema/'
32-
'samples/config/petstore/protobuf-schema-config/'
33-
'samples/config/petstore/protobuf-schema-config-complex/'
31+
samples/config/petstore/protobuf-schema
32+
samples/config/petstore/protobuf-schema-config
33+
samples/config/petstore/protobuf-schema-config-complex
3434
3535
build:
3636
name: Build Protobuf Client

.github/workflows/samples-python-client-echo-api.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
setup:
1212
runs-on: ubuntu-latest
1313
outputs:
14-
matrix: ${{ steps.filter.outputs.matrix }}
14+
samples: ${{ steps.filter.outputs.samples }}
1515
steps:
1616
- uses: actions/checkout@v5
1717
with:
@@ -25,20 +25,22 @@ jobs:
2525
all_samples: |
2626
samples/client/echo_api/python
2727
samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent
28-
"3.10"
29-
"3.11"
30-
"3.12"
31-
"3.13"
32-
"3.14"
3328
3429
build:
3530
name: Test Python client
3631
needs: setup
37-
if: ${{ needs.setup.outputs.matrix != '[]' }}
32+
if: ${{ needs.setup.outputs.samples != '[]' }}
3833
runs-on: ubuntu-latest
3934
strategy:
4035
fail-fast: false
41-
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
36+
matrix:
37+
python-version:
38+
- "3.10"
39+
- "3.11"
40+
- "3.12"
41+
- "3.13"
42+
- "3.14"
43+
sample: ${{ fromJson(needs.setup.outputs.samples) }}
4244
steps:
4345
- uses: actions/checkout@v5
4446
- uses: actions/setup-python@v6

.github/workflows/samples-python-pydantic-v1-client-echo-api.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
setup:
1212
runs-on: ubuntu-latest
1313
outputs:
14-
matrix: ${{ steps.filter.outputs.matrix }}
14+
samples: ${{ steps.filter.outputs.samples }}
1515
steps:
1616
- uses: actions/checkout@v5
1717
with:
@@ -23,21 +23,23 @@ jobs:
2323
# Action inputs don't support arrays, so this is a newline-delimited string parsed in the action script.
2424
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
2525
all_samples: |
26-
samples/client/echo_api/python-pydantic-v1/
27-
"3.8"
28-
"3.9"
29-
"3.10"
30-
"3.11"
31-
"3.12"
26+
samples/client/echo_api/python-pydantic-v1
3227
3328
build:
3429
name: Test Python client
3530
needs: setup
36-
if: ${{ needs.setup.outputs.matrix != '[]' }}
31+
if: ${{ needs.setup.outputs.samples != '[]' }}
3732
runs-on: ubuntu-latest
3833
strategy:
3934
fail-fast: false
40-
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
35+
matrix:
36+
python-version:
37+
- "3.8"
38+
- "3.9"
39+
- "3.10"
40+
- "3.11"
41+
- "3.12"
42+
sample: ${{ fromJson(needs.setup.outputs.samples) }}
4143
steps:
4244
- uses: actions/checkout@v5
4345
- uses: actions/setup-python@v6

.github/workflows/samples-r.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ jobs:
2929
# Action inputs don't support arrays, so this is a newline-delimited string parsed in the action script.
3030
# To add a new sample: add it here AND add a matching entry to the paths: trigger above.
3131
all_samples: |
32-
samples/client/petstore/R/
33-
samples/client/petstore/R-httr2/
34-
samples/client/petstore/R-httr2-wrapper/
35-
80:8080
32+
samples/client/petstore/R
33+
samples/client/petstore/R-httr2
34+
samples/client/petstore/R-httr2-wrapper
3635
3736
build:
3837
name: Build R projects
@@ -42,6 +41,14 @@ jobs:
4241
strategy:
4342
fail-fast: false
4443
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
44+
services:
45+
petstore-api:
46+
image: swaggerapi/petstore
47+
ports:
48+
- 80:8080
49+
env:
50+
SWAGGER_HOST: http://petstore.swagger.io
51+
SWAGGER_BASE_PATH: /v2
4552
steps:
4653
- uses: actions/checkout@v5
4754
- name: Add hosts to /etc/hosts

0 commit comments

Comments
 (0)