Skip to content

Commit

Permalink
update cd workflow (opea-project#689)
Browse files Browse the repository at this point in the history
Signed-off-by: ZePan110 <[email protected]>
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue authored Sep 13, 2024
1 parent 2794abd commit 3c5fc80
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/_comps-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ permissions: read-all
on:
workflow_call:
inputs:
node:
required: true
type: string
service:
required: true
type: string
Expand Down Expand Up @@ -36,7 +33,7 @@ jobs:
# Image Build
####################################################################################################
build-images:
runs-on: "docker-build-${{ inputs.node }}"
runs-on: "docker-build-gaudi"
continue-on-error: true
outputs:
file_exists: ${{ steps.get-yaml-path.outputs.file_exists }}
Expand Down Expand Up @@ -84,10 +81,9 @@ jobs:
####################################################################################################
test-service-compose:
needs: [build-images]
if: ${{ fromJSON(inputs.test) && needs.build-images.outputs.file_exists == 'true' }}
if: ${{ fromJSON(inputs.test) }}
uses: ./.github/workflows/_run-docker-compose.yml
with:
tag: ${{ inputs.tag }}
service: ${{ inputs.service }}
hardware: ${{ inputs.node }}
secrets: inherit
8 changes: 2 additions & 6 deletions .github/workflows/_run-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ on:
description: Example to test
required: true
type: string
hardware:
description: Hardware to run the test on
required: true
type: string
jobs:
get-test-case:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -57,14 +53,15 @@ jobs:
cd ${{ github.workspace }}/tests
test_cases=$(find . -type f -name "test_${service_l}*.sh" -print | jq -R '.' | jq -sc '.')
echo "test_cases=$test_cases" >> $GITHUB_OUTPUT
# TODO: get hardware for test matrix
run-test:
needs: [get-test-case]
strategy:
matrix:
test_case: ${{ fromJSON(needs.get-test-case.outputs.test_cases) }}
fail-fast: false
runs-on: ${{ inputs.hardware }}
runs-on: gaudi
continue-on-error: true
steps:
- name: Clean up Working Directory
Expand All @@ -88,7 +85,6 @@ jobs:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
PINECONE_KEY: ${{ secrets.PINECONE_KEY }}
service: ${{ inputs.service }}
hardware: ${{ inputs.hardware }}
test_case: ${{ matrix.test_case }}
run: |
cd ${{ github.workspace }}/tests
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/manual-comps-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
with:
service: ${{ matrix.service }}
tag: ${{ inputs.tag }}
node: gaudi
mode: ${{ inputs.mode }}
test: ${{ inputs.test }}
secrets: inherit

0 comments on commit 3c5fc80

Please sign in to comment.