Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cd workflow #689

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading