Skip to content

Commit 0f5a91f

Browse files
authored
Merge pull request #13 from lzwjava/feat/github-action-ci
Feat: Add GitHub Actions CI for Tests
2 parents ce52d66 + 3fe139a commit 0f5a91f

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/test.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- 'mini_copilot/**'
8+
- 'tests/**'
9+
pull_request:
10+
paths:
11+
- 'mini_copilot/**'
12+
- 'tests/**'
13+
14+
concurrency:
15+
group: 'test'
16+
cancel-in-progress: false
17+
18+
jobs:
19+
test_job:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python 3.13.2
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: "3.13.2"
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install -r requirements.txt
35+
pip install coverage pytest-cov beautifulsoup4 readability-lxml lxml requests pyperclip
36+
37+
- name: Run test script
38+
run: |
39+
export PYTHONPATH=$PYTHONPATH:.
40+
python3 -m coverage run -m unittest discover tests
41+
python3 -m coverage report -m mini_copilot/*.py mini_copilot/commands/*.py

0 commit comments

Comments
 (0)