-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (54 loc) · 1.49 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: test
on:
push:
branches:
- main
- dev
paths-ignore:
- '**/*.md'
- '**/*.ipynb'
- 'examples/**'
pull_request:
branches:
- main
- dev
paths-ignore:
- '**/*.md'
- '**/*.ipynb'
- 'examples/**'
jobs:
test:
name: Tests on ${{ matrix.os }} for ${{ matrix.python-version }}
strategy:
matrix:
python-version: [3.9, 3.11]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Build and Test
run: |
python -m pytest -o log_cli=true -o log_cli_level="INFO" --cov=nano_vectordb --cov-report=xml -v ./
- name: Check codecov file
id: check_files
uses: andstor/file-existence-action@v1
with:
files: './coverage.xml'
- name: Upload coverage from test to Codecov
uses: codecov/codecov-action@v2
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}