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

Split taskfiles by components #49

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
61 changes: 32 additions & 29 deletions .github/workflows/test-integrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,38 @@

name: test-integrations
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
destroy-cluster:
description: 'Destroy test cluster'
required: false
default: true
type: boolean
python-version:
description: 'Python version to install'
required: false
default: '3.12'
kind-version:
description: 'Kind version'
required: false
default: '0.24.0'

jobs:
set-kind-version:
runs-on: ubuntu-latest
outputs:
kind-version: ${{steps.set-kind-version.outputs.kind-version }}
steps:
- name: Set KinD version
id: set-kind-version
env:
KIND_VERSION: '0.24.0'
shell: bash
run: |
if [ "${{ github.event_name }}" == 'workflow_dispatch' ]; then
KIND_VERSION="${{ inputs.kind-version }}"
fi

echo "Set KinD version to: $KIND_VERSION"
echo "kind-version=$KIND_VERSION" >> "$GITHUB_OUTPUT"

run-tests-gateway:
needs: [ set-kind-version ]
runs-on: ubuntu-latest

permissions:
Expand Down Expand Up @@ -51,18 +65,14 @@ jobs:
- name: Setup K8S Tools
uses: ./.github/actions/setup-k8s
with:
kind-version: ${{ inputs.kind-version }}
kind-version: ${{ needs.set-kind-version.outputs.kind-version }}

- name: Create kind cluster
run: |
cd integrations
task kind:create
run: task integrations:kind:create
shell: bash

- name: Deploy agntcy agp
run: |
cd integrations
task test:env:gateway:deploy
run: task integrations:gateway:test-env:deploy
shell: bash

- name: Run simple gateway tests
Expand All @@ -72,12 +82,11 @@ jobs:
AZURE_DEPLOYMENT_NAME: ${{ vars.AZURE_DEPLOYMENT_NAME }}
AZURE_OPENAI_API_VERSION: ${{ vars.AZURE_OPENAI_API_VERSION }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
run: |
cd integrations
task test:gateway
run: task integrations:gateway:test
shell: bash

run-tests-directory:
needs: [ set-kind-version ]
runs-on: ubuntu-latest

permissions:
Expand Down Expand Up @@ -108,22 +117,16 @@ jobs:
- name: Setup K8S Tools
uses: ./.github/actions/setup-k8s
with:
kind-version: ${{ inputs.kind-version }}
kind-version: ${{ needs.set-kind-version.outputs.kind-version }}

- name: Create kind cluster
run: |
cd integrations
task kind:create
run: task integrations:kind:create
shell: bash

- name: Deploy agntcy dir
run: |
cd integrations
task test:env:directory:deploy
run: task integrations:directory:test-env:deploy
shell: bash

- name: Run agent build tests
run: |
cd integrations
task test:directory
run: task integrations:directory:test
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/test-samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: ./.github/actions/detect-changes
id: detect-changes
with:
dirs: $(find ./samples \( -name 'pyproject.toml' -o -name 'Taskfile.yaml' \) | xargs -n1 dirname | sort -u)
dirs: $(find ./samples -mindepth 2 \( -name 'pyproject.toml' -o -name 'Taskfile.yml' \) | xargs -n1 dirname | sort -u)

test:
name: Test on samples
Expand Down
19 changes: 19 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: Apache-2.0

---
version: '3'

silent: true

includes:
integrations:
taskfile: ./integrations/Taskfile.yml
dir: ./integrations
samples:
taskfile: ./samples/Taskfile.yml
dir: ./samples

tasks:
default:
cmd: task -l
241 changes: 0 additions & 241 deletions integrations/Taskfile.yaml

This file was deleted.

Loading