forked from Teng91/chatbot-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.31 KB
/
Copy pathci.yml
File metadata and controls
50 lines (41 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI
on:
push:
branches: [master, main, feat/*]
pull_request:
branches: [master, main, feat/*]
permissions:
contents: read
pull-requests: write
jobs:
test:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# ── Checkout backend ──
- uses: actions/checkout@v4
with:
path: chatbot-plugin
# ── Checkout SDK (sibling directory so ../chatbot-plugin-sdk resolves) ──
- uses: actions/checkout@v4
with:
repository: Teng91/chatbot-plugin-sdk
path: chatbot-plugin-sdk
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"
- name: Install dependencies
working-directory: ./chatbot-plugin
run: uv sync --all-groups
- name: Run tests
working-directory: ./chatbot-plugin
run: uv run pytest src/tests/ -v --tb=short --cov=chatbot_plugin --cov-report=xml:coverage.xml --junitxml=pytest.xml
- name: Post coverage comment
if: github.event_name == 'pull_request'
uses: MishaKav/pytest-coverage-comment@v1.6.0
with:
pytest-xml-coverage-path: ./chatbot-plugin/coverage.xml
junitxml-path: ./chatbot-plugin/pytest.xml
title: Test Coverage
github-token: ${{ secrets.GITHUB_TOKEN }}