1- name : Continuous Integration (Single Client)
1+ name : Generate and test client
22on :
3- push :
4- branches :
5- - ' main '
6- - ' master '
7- - ' refs/heads/v[0-9]+.[0-9]+.[0-9]+ '
8- pull_request :
3+ workflow_call :
4+ inputs :
5+ name :
6+ description : Name of the client to test
7+ required : true
8+ type : string
99jobs :
1010 generate-and-test-client :
1111 runs-on : ubuntu-latest
@@ -18,13 +18,13 @@ jobs:
1818 fetch-depth : ' 0'
1919 persist-credentials : ' false'
2020 - uses : " ramsey/composer-install@v2"
21- - run : make generate-example-client-one
21+ - run : make generate-example-client-${{ inputs.name }}
2222 - name : Tar example files
2323 run : tar -czf example.tar ./example
2424 - name : Upload Generated Client
2525 uses : actions/upload-artifact@v3
2626 with :
27- name : example-single -client
27+ name : example-${{ inputs.name }} -client
2828 path : ./example.tar
2929 supported-versions-matrix :
3030 name : Supported Versions Matrix
@@ -50,14 +50,14 @@ jobs:
5050 - name : Download Generated Client
5151 uses : actions/download-artifact@v3
5252 with :
53- name : example-single -client
53+ name : example-${{ inputs.name }} -client
5454 path : ./
5555 - name : UnTar example files
56- run : tar -xzf example.tar
56+ run : tar -xzf example.tar
5757 - id : supported-checks-matrix
5858 name : Generate check
5959 run : |
60- cd example/generated
60+ cd example/generated-${{ inputs.name }}
6161 printf "Checks found: %s\r\n" $(make task-list-ci)
6262 printf "::set-output name=check::%s" $(make task-list-ci)
6363 qa :
@@ -83,23 +83,23 @@ jobs:
8383 - name : Download Generated Client
8484 uses : actions/download-artifact@v3
8585 with :
86- name : example-single -client
86+ name : example-${{ inputs.name }} -client
8787 path : ./
8888 - name : UnTar example files
89- run : tar -xzf example.tar
89+ run : tar -xzf example.tar
9090 - uses : ramsey/composer-install@v2
9191 with :
92- working-directory : " example/generated/"
92+ working-directory : " example/generated-${{ inputs.name }} /"
9393 ignore-cache : " yes"
9494 - run : |
95- cd example/generated
95+ cd example/generated-${{ inputs.name }}
9696 make ${{ matrix.check }} || true
9797 if: needs.supported-versions-matrix.outputs.upcoming == matrix.php
9898 env:
9999 COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
100100 COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
101101 - run : |
102- cd example/generated
102+ cd example/generated-${{ inputs.name }}
103103 make ${{ matrix.check }}
104104 if: needs.supported-versions-matrix.outputs.upcoming != matrix.php
105105 env:
0 commit comments