Skip to content

Commit

Permalink
feat: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyoucao577 committed Nov 16, 2024
1 parent a9a3642 commit 72af7d9
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "dev",
"image": "ghcr.io/ten-framework/ten_agent_build:0.2.3",
"customizations": {
"vscode": {
"extensions": [
"ms-python.autopep8",
"ms-python.vscode-pylance",
"ms-python.python",
"ms-python.debugpy"
]
}
},
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git:1": {}
}
}
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
release:
types: [created]
push:
branches:
- "**"
paths-ignore:
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/ci.yml"
- "**.md"
pull_request:
paths-ignore:
- ".vscode/**"
- ".devcontainer/**"
- ".github/**"
- "!.github/workflows/ci.yml"
- "**.md"

jobs:
ci:
runs-on: ubuntu-latest
container:
image: ghcr.io/ten-framework/ten_agent_build:0.2.3
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
submodules: "true"

- name: Check ten dependencies
run: |
tman install
- name: Release
if: startsWith(github.ref, 'refs/tags/')
run: |
# replace version by tag
jq '.version = "${{ github.ref_name }}"' manifest.json >manifest.gen.json
# check after replace
diff manifest.gen.json manifest.json || true
mv manifest.gen.json manifest.json
jq . manifest.json
# publish to store
tman --verbose --user-token ${{ secrets.TEN_CLOUD_STORE }} publish
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
.ten
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.analysis.extraPaths": [
".ten/app/ten_packages/system/ten_runtime_python/interface",
".ten/app/ten_packages/system/ten_ai_base/interface",
],
"editor.formatOnSave": true,
}

0 comments on commit 72af7d9

Please sign in to comment.