Weekly oneclick test all examples on multiple HWs #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create Matrix | |
| id: get-matrix | |
| run: | | |
| examples=$(grep -oP '^\s{4}"\K[^"]+(?=":)' ${{ github.workspace }}/one_click_deploy/core/config.py) | |
| 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 | |
| # id-token: write | |
| # actions: read | |
| # attestations: read | |
| # checks: write | |
| # deployments: write | |
| # discussions: read | |
| # issues: write | |
| # models: read | |
| # packages: write | |
| # pages: write | |
| # pull-requests: write | |
| # repository-projects: read | |
| # statuses: write | |
| # security-events: 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) }} | |
| fail-fast: false | |
| uses: ./.github/workflows/_run-one-click.yml | |
| with: | |
| hardware: ${{ matrix.node }} | |
| example: ${{ matrix.example }} | |
| deploy_method: ${{ matrix.deploy_method }} | |
| registry: "opea" | |
| secrets: inherit |