Skip to content

Commit

Permalink
chore: cleanup GH actions (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
anssari1 authored Oct 22, 2024
1 parent a2a3098 commit b595f51
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 288 deletions.
91 changes: 0 additions & 91 deletions .github/workflows/core-release.yaml

This file was deleted.

105 changes: 0 additions & 105 deletions .github/workflows/core-upgrade.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/generator-download-specs.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/generator-test-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ on:
description: 'SDK to generate test jar for'
required: true
type: string
endpoint_prefix:
description: 'Endpoint to prepend specs paths with'
required: true
type: string
product_repo:
description: 'Product repository'
required: true
type: string
transformations:
description: 'Specs transformations'
required: true
type: string
outputs:
artifactId:
value: ${{ jobs.sdk-metadata.outputs.artifactId }}
Expand All @@ -30,7 +30,7 @@ jobs:
transform-specs:
uses: ./.github/workflows/selfserve-transform-specs.yaml
with:
transformations: '-th -te ${{ inputs.endpoint_prefix }} --operationIdsToTags'
transformations: ${{ inputs.transformations }}
repository: ${{ inputs.product_repo }}
ref: 'main'

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pr-check-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ jobs:
run-rapid-tests:
uses: ./.github/workflows/run-tests.yaml
with:
source: 'specs'
sdk_version: 1.0.${{ github.run_id }}
sdk_namespace: 'rapid'
endpoint_prefix: '/v3'
transformations: '-th -te /v3 --operationIdsToTags'
product_repo: 'ExpediaGroup/rapid-java-sdk'
secrets: inherit
70 changes: 5 additions & 65 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,7 @@
name: Run Tests
on:
workflow_dispatch:
inputs:
source:
description: 'Source of tests'
required: true
type: choice
options:
- 'specs'
- 'sdk'
default: 'sdk'
specs_url:
description: 'Run tests based on specs'
required: false
type: string
default: ''
sdk_version:
description: 'Run tests based on SDK'
required: false
type: string
default: 'LATEST'
sdk_namespace:
description: 'SDK to test'
required: true
type: string
default: 'rapid'
endpoint_prefix:
description: 'Endpoint to prepend specs paths with'
required: true
type: string
jdk:
description: 'JDK version to use'
required: true
type: choice
options:
- '21'
- '17'
- '11'
- '8'
default: '21'
workflow_call:
inputs:
source:
description: 'Source of tests'
required: true
type: string
default: 'sdk'
specs_url:
description: 'Run tests based on specs'
required: false
type: string
default: ''
sdk_version:
description: 'Run tests based on SDK'
required: false
Expand All @@ -61,8 +12,8 @@ on:
required: true
type: string
default: 'rapid'
endpoint_prefix:
description: 'Endpoint to prepend specs paths with'
transformations:
description: 'Specs transformations'
required: true
type: string
product_repo:
Expand All @@ -71,31 +22,20 @@ on:
type: string

jobs:
inputs-validation:
runs-on: ubuntu-latest
steps:
- shell: python -u {0}
run: |
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 ]
uses: ./.github/workflows/generator-test-sdk.yaml
secrets: inherit
with:
version: ${{ inputs.sdk_version }}
namespace: ${{ inputs.sdk_namespace }}
endpoint_prefix: ${{ inputs.endpoint_prefix }}
product_repo: ${{ inputs.product_repo }}
transformations: ${{ inputs.transformations }}

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'
if: inputs.sdk_namespace == 'rapid'
needs: [ generate-test-sdk ]
uses: "ExpediaGroup/rapid-java-sdk/.github/workflows/run-examples.yaml@main"
with:
Expand Down

0 comments on commit b595f51

Please sign in to comment.