|
| 1 | +name: Run tests for Remote-Vector-Index-Builder |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: # Note this is done for folder specific checkouts, reduce CI memory load |
| 6 | + - 'remote_vector_index_builder/**' |
| 7 | + - 'test_remote_vector_index_builder/**' |
| 8 | + pull_request: |
| 9 | + paths: # Note this is done for folder specific checkouts, reduce CI memory load |
| 10 | + - 'remote_vector_index_builder/**' |
| 11 | + - 'test_remote_vector_index_builder/**' |
| 12 | + |
| 13 | +permissions: |
| 14 | + contents: read |
| 15 | + |
| 16 | +jobs: |
| 17 | + run-tests: |
| 18 | + name: Run tests for Remote-Vector-Index-Builder |
| 19 | + runs-on: ubuntu-latest |
| 20 | + if: github.repository == 'opensearch-project/remote-vector-index-builder' |
| 21 | + |
| 22 | + steps: |
| 23 | + # https://github.com/actions/checkout?tab=readme-ov-file#usage |
| 24 | + - name: Checkout code |
| 25 | + uses: actions/checkout@v4 |
| 26 | + with: |
| 27 | + # Note this is done for folder specific checkouts, reduce CI memory load |
| 28 | + sparse-checkout: | |
| 29 | + .github/CODEOWNERS |
| 30 | + remote_vector_index_builder |
| 31 | + test_remote_vector_index_builder |
| 32 | + - name: Setup Python |
| 33 | + uses: actions/setup-python@v5 |
| 34 | + with: |
| 35 | + python-version: '3.11' |
| 36 | + |
| 37 | + - name: Install dependencies |
| 38 | + run: | |
| 39 | + python -m pip install --upgrade pip |
| 40 | + python -m pip install -r remote_vector_index_builder/core/requirements.txt |
| 41 | + python -m pip install -r test_remote_vector_index_builder/requirements.txt |
| 42 | +
|
| 43 | + - name: Run Linting - flake8 |
| 44 | + run: | |
| 45 | + python -m flake8 remote_vector_index_builder/ test_remote_vector_index_builder/ |
| 46 | +
|
| 47 | + - name: Run Formatter - black |
| 48 | + run: | |
| 49 | + python -m black --check remote_vector_index_builder/ test_remote_vector_index_builder/ |
| 50 | +
|
| 51 | + - name: Run Type Checker - mypy |
| 52 | + run: | |
| 53 | + python -m mypy remote_vector_index_builder/ test_remote_vector_index_builder/ |
| 54 | + - name: Run tests |
| 55 | + run: | |
| 56 | + python -m pytest test_remote_vector_index_builder/ |
0 commit comments