Make use of shared workflows #2725
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
| name: validate-examples | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feature/* | |
| tags: | |
| - v* | |
| - workflow-v* | |
| - grpc-v* | |
| - fastapi-v* | |
| - flask-v* | |
| - langgraph-v* | |
| - strands-v* | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| - feature/* | |
| workflow_dispatch: | |
| inputs: | |
| daprdapr_commit: | |
| description: 'Dapr/Dapr commit to build custom daprd from' | |
| required: false | |
| default: '' | |
| daprcli_commit: | |
| description: 'Dapr/CLI commit to build custom dapr CLI from' | |
| required: false | |
| default: '' | |
| repository_dispatch: | |
| types: [validate-examples] | |
| merge_group: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| env: | |
| CHECKOUT_REPO: ${{ github.repository }} | |
| CHECKOUT_REF: ${{ github.ref }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Parse repository_dispatch payload | |
| if: github.event_name == 'repository_dispatch' | |
| run: | | |
| if [ ${{ github.event.client_payload.command }} = "ok-to-test" ]; then | |
| echo "CHECKOUT_REPO=${{ github.event.client_payload.pull_head_repo }}" >> $GITHUB_ENV | |
| echo "CHECKOUT_REF=${{ github.event.client_payload.pull_head_ref }}" >> $GITHUB_ENV | |
| fi | |
| - name: Check out code onto GOPATH | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: ${{ env.CHECKOUT_REPO }} | |
| ref: ${{ env.CHECKOUT_REF }} | |
| - uses: azure/setup-helm@v4 | |
| - name: Set up Python ${{ matrix.python_ver }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python_ver }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install setuptools wheel twine tox | |
| - name: Set up Dapr CLI | |
| uses: dapr/.github/.github/actions/setup-dapr-cli@main | |
| with: | |
| commit: ${{ github.event.inputs.daprcli_commit }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Dapr runtime | |
| uses: dapr/.github/.github/actions/setup-dapr-runtime@main | |
| with: | |
| commit: ${{ github.event.inputs.daprdapr_commit }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Llama | |
| run: | | |
| curl -fsSL https://ollama.com/install.sh | sh | |
| nohup ollama serve & | |
| sleep 10 | |
| ollama pull llama3.2:latest | |
| - name: Check Examples | |
| run: | | |
| tox -e examples |