Skip to content

Commit

Permalink
chore: add ci for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyoucao577 authored Jan 28, 2025
1 parent 212d1e9 commit 4842f0b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
pull_request:
branches: [ "main" ]
paths-ignore:
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/build-docker.yaml"
- ".vscode/**"
- "docs/**"
- "**.md"
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest
container:
image: ghcr.io/ten-framework/ten_agent_build:0.4.10
strategy:
matrix:
agent: [agents/example/default, agents/example/demo]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
submodules: "true"

- name: Use agent
run: |
task use AGENT={{ matrix.agent }}
- name: Run tests
run: |
task test -- -s -v
14 changes: 5 additions & 9 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ tasks:
dir: ./agents
internal: true
cmds:
- rm -rf manifest.json property.json manifest-lock.json bin/main bin/worker out .release ten_packages/system/ten_runtime* ten_packages/system/agora_rtc_sdk ten_packages/system/azure_speech_sdk ten_packages/system/nlohmann_json ten_packages/extension/agora_rtc ten_packages/extension/agora_rtm ten_packages/extension/agora_sess_ctrl ten_packages/extension/azure_tts ten_packages/addon_loader
- rm -rf manifest.json property.json manifest-lock.json bin/main bin/worker out .release ten_packages/system ten_packages/system/agora_rtc_sdk ten_packages/system/azure_speech_sdk ten_packages/system/nlohmann_json ten_packages/extension/agora_rtc ten_packages/extension/agora_rtm ten_packages/extension/agora_sess_ctrl ten_packages/extension/azure_tts ten_packages/addon_loader
- find . -type d -name .pytest_cache -exec rm -rf {} \; || true
- find . -type d -name __pycache__ -exec rm -rf {} \; || true
- find . -type d -name .ten -exec rm -rf {} \; || true
- find . -name .coverage -exec rm -f {} \; || true

clean-server:
desc: clean up server
Expand All @@ -82,16 +86,8 @@ tasks:
desc: run tests
cmds:
- task: test-agent-extensions
- task: test-agent
- task: test-server

test-agent:
desc: test agent
dir: ./agents
internal: true
cmds:
- echo TODO test agent

test-server:
desc: test server
dir: ./server
Expand Down

0 comments on commit 4842f0b

Please sign in to comment.