-
Notifications
You must be signed in to change notification settings - Fork 54
55 lines (45 loc) · 1.35 KB
/
lint-and-test.yaml
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
name: Curator testing workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-integration:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Load cached Poetry installation
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Load cached venv
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Set Locale
run: |
sudo locale-gen "en_US.UTF-8"
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export TELEMETRY_ENABLED=false
- name: Install dependencies
run: |
pip install poetry
poetry install --with dev --extras "vllm code_execution"
- name: Run ruff
run: |
poetry run ruff check . --output-format=github
poetry run ruff format . --check
- name: Run tests with coverage
run: |
poetry run pytest --cov='bespokelabs' --cov-report=html --cov-fail-under=80 tests/