-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (48 loc) · 1.94 KB
/
run-tests.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: Run tests for Remote-Vector-Index-Builder
on:
push:
paths: # Note this is done for folder specific checkouts, reduce CI memory load
- 'remote_vector_index_builder/**'
- 'test_remote_vector_index_builder/**'
pull_request:
paths: # Note this is done for folder specific checkouts, reduce CI memory load
- 'remote_vector_index_builder/**'
- 'test_remote_vector_index_builder/**'
permissions:
contents: read
jobs:
run-tests:
name: Run tests for Remote-Vector-Index-Builder
runs-on: ubuntu-latest
if: github.repository == 'opensearch-project/remote-vector-index-builder'
steps:
# https://github.com/actions/checkout?tab=readme-ov-file#usage
- name: Checkout code
uses: actions/checkout@v4
with:
# Note this is done for folder specific checkouts, reduce CI memory load
sparse-checkout: |
.github/CODEOWNERS
remote_vector_index_builder
test_remote_vector_index_builder
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r remote_vector_index_builder/core/requirements.txt
python -m pip install -r test_remote_vector_index_builder/requirements.txt
- name: Run Linting - flake8
run: |
python -m flake8 remote_vector_index_builder/ test_remote_vector_index_builder/
- name: Run Formatter - black
run: |
python -m black --check remote_vector_index_builder/ test_remote_vector_index_builder/
- name: Run Type Checker - mypy
run: |
python -m mypy remote_vector_index_builder/ test_remote_vector_index_builder/
- name: Run tests
run: |
python -m pytest test_remote_vector_index_builder/