diff --git a/.github/workflows/generator-download-specs.yaml b/.github/workflows/generator-download-specs.yaml index ab5534cb2..9d8160171 100644 --- a/.github/workflows/generator-download-specs.yaml +++ b/.github/workflows/generator-download-specs.yaml @@ -18,4 +18,3 @@ jobs: with: name: raw-specs path: raw-specs.yaml - overwrite: true diff --git a/.github/workflows/generator-test-sdk.yaml b/.github/workflows/generator-test-sdk.yaml index 81d739d2f..213d6332f 100644 --- a/.github/workflows/generator-test-sdk.yaml +++ b/.github/workflows/generator-test-sdk.yaml @@ -33,15 +33,17 @@ jobs: url: ${{ inputs.specs_url }} transform-specs: needs: [ download-specs ] - uses: ./.github/workflows/generator-transform-specs.yaml + uses: ./.github/workflows/selfserve-transform-specs.yaml with: - configurations: -th -te ${{ inputs.endpoint_prefix }} --operationIdsToTags + specs_key: 'raw-specs' + transformations: -th -te ${{ inputs.endpoint_prefix }} --operationIdsToTags generate-sdk: needs: [ transform-specs ] - uses: ./.github/workflows/generator-generate.yaml + uses: ./.github/workflows/selfserve-generate.yaml with: name: ${{ inputs.namespace }} version: ${{ inputs.version }} + templates: 'sdk-repo/generator/openapi/src/main/resources/templates/expediagroup-sdk' sdk-metadata: runs-on: ubuntu-latest needs: [ generate-sdk ] diff --git a/.github/workflows/pr-check-tests.yaml b/.github/workflows/pr-check-tests.yaml index ca66e1d53..6fb5dfe57 100644 --- a/.github/workflows/pr-check-tests.yaml +++ b/.github/workflows/pr-check-tests.yaml @@ -3,17 +3,11 @@ on: push jobs: run-rapid-tests: - strategy: - matrix: - jdk: [8, 11, 17, 21] - fail-fast: true - max-parallel: 1 uses: ./.github/workflows/run-tests.yaml with: source: 'specs' specs_url: 'https://ewe-assets.s3.amazonaws.com/developer-tools/api/rapid/v3/specs.yaml' sdk_version: 1.0.${{ github.run_id }} sdk_namespace: 'rapid' - jdk: ${{ matrix.jdk }} endpoint_prefix: '/v3' secrets: inherit diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 903606739..7633198c4 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -61,11 +61,6 @@ on: required: true type: string default: 'rapid' - jdk: - description: 'JDK version to use' - required: true - type: string - default: '21' endpoint_prefix: description: 'Endpoint to prepend specs paths with' required: true @@ -84,6 +79,7 @@ jobs: if 'sdk' in '${{ inputs.source }}' and not('${{ inputs.sdk_version }}'): print('::error::Invalid SDK version: ${{ inputs.sdk_version }}') exit(1) + generate-test-sdk: if: inputs.source == 'specs' needs: [ inputs-validation ] @@ -95,13 +91,15 @@ jobs: specs_url: ${{ inputs.specs_url }} secrets: inherit run-rapid-examples: + strategy: + matrix: + jdk: [8, 11, 17, 21] if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && inputs.sdk_namespace == 'rapid' needs: [ generate-test-sdk ] uses: "ExpediaGroup/rapid-java-sdk/.github/workflows/run-examples.yaml@main" with: sdk_version: ${{ needs.generate-test-sdk.outputs.version }} - jdk: ${{ inputs.jdk }} - sdk_generation_workflow_run_id: ${{ github.run_id }} + jdk: ${{ matrix.jdk }} secrets: KEY: ${{ secrets.RAPID_KEY }} SECRET: ${{ secrets.RAPID_SECRET }} diff --git a/.github/workflows/selfserve-generate.yaml b/.github/workflows/selfserve-generate.yaml index 48366a993..907503830 100644 --- a/.github/workflows/selfserve-generate.yaml +++ b/.github/workflows/selfserve-generate.yaml @@ -23,6 +23,10 @@ on: description: 'Key to the generated SDK artifact' default: 'sdk' type: string + jar_key: + description: 'Key to the generated JAR artifact' + default: 'jar' + type: string jobs: generate: @@ -61,4 +65,11 @@ jobs: path: | sdk-repo/generator/openapi/target/sdk !sdk-repo/generator/openapi/target/sdk/target + - name: Persist JAR Artifact # TODO: Remove when product config is proposed + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.jar_key }} + path: | + sdk-repo/generator/openapi/target/sdk/target/*.jar + sdk-repo/generator/openapi/target/sdk/target/maven-archiver/pom.properties overwrite: true