-
Notifications
You must be signed in to change notification settings - Fork 275
42 lines (36 loc) · 883 Bytes
/
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
name: Python lint and test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Set up uv
run: |
curl -LsSf https://astral.sh/uv/0.3.2/install.sh | sh
- name: Install dependencies with uv
run: |
uv pip install -r pyproject.toml --extra dev
env:
UV_SYSTEM_PYTHON: 1
- name: Lint and format with ruff
run: |
ruff format --check
ruff check --output-format github
- name: Test with pytest
run: |
pytest
env:
OPENAI_API_KEY: sk-fake-openai-key
GROQ_API_KEY: gsk_fake_groq_key