-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.02 KB
/
unit_test.yml
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
name: Run Unit Test
on:
push:
branches:
- master
- feature/unit_test
paths-ignore:
- 'README.md'
- 'README_zh.md'
- 'Makefile'
- 'ruff.toml'
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install "pip<24.1"
pip install -r requirements-full.txt
pip install "sqlite-vec==0.1.1"
pip install pytest pytest-cov coverage codecov
- name: Test with pytest
run: pytest --cov
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload results to Code Climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: coverage xml