This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 121
62 lines (55 loc) · 1.7 KB
/
CI.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
57
58
59
60
61
62
name: CI
on: pull_request
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
- name: install dependencies
run: poetry install --with dev
- name: Run flake8 Check
run: poetry run flake8 .
- name: Run mypy check
run: poetry run mypy .
run-tests:
name: Run tests
runs-on: ubuntu-latest
needs: run-linters
strategy:
matrix:
python-version: [3.9, '3.10', 3.11]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
- name: install dependencies
run: poetry install --with dev --all-extras
- name: Run unit tests
run: poetry run pytest --html=report.html --self-contained-html tests/unit
- name: Run system tests
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PINECONE_ENVIRONMENT: eu-west1-gcp
run: poetry run pytest -n 3 --dist loadscope --html=report_system.html --self-contained-html tests/system
- name: upload pytest report.html
uses: actions/upload-artifact@v3
if: always()
with:
name: dataset-pytest-report-py${{ matrix.python-version }}
path: report*.html