Skip to content

Weekly oneclick test all examples on multiple HWs #38

Weekly oneclick test all examples on multiple HWs

Weekly oneclick test all examples on multiple HWs #38

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Weekly oneclick test all examples on multiple HWs
permissions:
contents: read
# id-token: write
on:
schedule:
- cron: "30 2 * * 6" # UTC time
workflow_dispatch:
env:
# EXAMPLES: ${{ vars.NIGHTLY_RELEASE_EXAMPLES }}
NODES: "gaudi,xeon"
DEPLOY_METHODS: "docker,k8s" # Not used in this workflow, but can be added if needed
jobs:
get-test-matrix:
runs-on: ubuntu-latest
outputs:
examples: ${{ steps.get-matrix.outputs.examples }}
nodes: ${{ steps.get-matrix.outputs.nodes }}
deploy_methods: ${{ steps.get-matrix.outputs.deploy_methods }}
steps:
- name: Checkout
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2
with:
fetch-depth: 0
- name: Create Matrix
id: get-matrix
run: |
# Get examples from one-click-inputs-nobuild.json (both ChatQnA and ChatQnA-Qwen will be included)
examples=$(jq -r '.docker | keys[]' ${{ github.workspace }}/.github/workflows/one-click-inputs-nobuild.json)
examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "examples=$examples_json" >> $GITHUB_OUTPUT
nodes=($(echo ${NODES} | tr ',' ' '))
nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
deploy_methods=($(echo ${DEPLOY_METHODS} | tr ',' ' '))
deploy_methods_json=$(printf '%s\n' "${deploy_methods[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "deploy_methods=$deploy_methods_json" >> $GITHUB_OUTPUT
run-examples:
permissions:
contents: read
needs: [get-test-matrix]
strategy:
matrix:
example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
deploy_method: ${{ fromJson(needs.get-test-matrix.outputs.deploy_methods) }}
exclude:
- example: AgentQnA
node: xeon
deploy_method: k8s
fail-fast: false
uses: ./.github/workflows/_run-one-click.yml
with:
hardware: ${{ matrix.node }}
example: ${{ matrix.example }}
deploy_method: ${{ matrix.deploy_method }}
os: "debian"
registry: "opea"
secrets: inherit