feat: add tests #8
Workflow file for this run
This file contains 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: 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.4.10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
submodules: "true" | |
- name: Check dependencies | |
run: | | |
task install | |
- name: Run tests | |
run: | | |
task test -- -s -v | |
- name: Run lint | |
run: | | |
task lint -- --errors-only | |
- 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 |