Skip to content
Merged
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
27 changes: 20 additions & 7 deletions .github/workflows/_run-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
get-test-case:
runs-on: ubuntu-latest
outputs:
test_cases: ${{ steps.test-case-matrix.outputs.test_cases }}
run_matrix: ${{ steps.test-case-matrix.outputs.run_matrix }}
CHECKOUT_REF: ${{ steps.get-checkout-ref.outputs.CHECKOUT_REF }}
steps:
- name: Get checkout ref
Expand All @@ -49,19 +49,31 @@ jobs:
id: test-case-matrix
run: |
set -x
run_matrix="{\"include\":["
service_l=$(echo ${{ inputs.service }} | tr '[:upper:]' '[:lower:]')
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
# test_cases=$(find . -type f -name "test_${service_l}*.sh" -print | jq -R '.' | jq -sc '.')
test_cases=$(find . -type f -name "test_${service_l}*.sh")
for script in $test_cases; do
echo $script
if echo "$script" | grep -q "on"; then
hardware=$(echo $script | cut -d'/' -f3 | cut -d'.' -f1 | awk -F'on_' '{print $2}')
run_matrix="${run_matrix}{\"test_case\":\"${script}\",\"hardware\":\"${hardware}\"},"
else
run_matrix="${run_matrix}{\"test_case\":\"${script}\",\"hardware\":\"intel_cpu\"},"
fi
done
run_matrix=$(echo "$run_matrix" | sed 's/,$//')
run_matrix=$run_matrix"]}"
echo "run_matrix=${run_matrix}"
echo "run_matrix=${run_matrix}" >> $GITHUB_OUTPUT

run-test:
needs: [get-test-case]
strategy:
matrix:
test_case: ${{ fromJSON(needs.get-test-case.outputs.test_cases) }}
fail-fast: false
runs-on: gaudi
include: ${{ fromJSON(needs.get-test-case.outputs.run_matrix).include }}
runs-on: ${{ matrix.hardware }}
continue-on-error: true
steps:
- name: Clean up Working Directory
Expand All @@ -86,6 +98,7 @@ jobs:
PINECONE_KEY: ${{ secrets.PINECONE_KEY }}
service: ${{ inputs.service }}
test_case: ${{ matrix.test_case }}
hardware: ${{ matrix.hardware }}
run: |
cd ${{ github.workspace }}/tests
service=$(echo "${test_case}" | cut -d'_' -f2- |cut -d'.' -f1)
Expand Down