File tree Expand file tree Collapse file tree 2 files changed +86
-0
lines changed
Expand file tree Collapse file tree 2 files changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Ruff Format Check
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ push :
8+ branches :
9+ - main
10+
11+ jobs :
12+ ruff-format :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v5
18+
19+ - name : Set up Python
20+ uses : actions/setup-python@v6
21+ with :
22+ python-version-file : " .python-version"
23+
24+ - name : Install uv
25+ uses : astral-sh/setup-uv@v6
26+ with :
27+ enable-cache : true
28+
29+ - name : Install dependenices
30+ run : uv sync --locked --all-extras --dev
31+
32+ - name : Check formatting with ruff
33+ run : uv run ruff format --check .
34+
35+ - name : Run ruff linter
36+ run : uv run ruff check .
37+
Original file line number Diff line number Diff line change 1+ name : Test Example Script
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+ inputs :
9+ pr_number :
10+ description : ' PR number to test (optional for manual runs)'
11+ required : false
12+ type : number
13+
14+ jobs :
15+ test-example :
16+ runs-on : ubuntu-latest
17+ if : |
18+ github.event_name == 'workflow_dispatch' ||
19+ github.event.pull_request.author_association == 'MEMBER' ||
20+ github.event.pull_request.author_association == 'OWNER' ||
21+ github.event.pull_request.author_association == 'COLLABORATOR'
22+
23+ steps :
24+ - name : Checkout code
25+ uses : actions/checkout@v5
26+ with :
27+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
28+
29+ - name : Set up Python
30+ uses : actions/setup-python@v6
31+ with :
32+ python-version-file : " .python-version"
33+
34+ - name : Install uv
35+ uses : astral-sh/setup-uv@v6
36+ with :
37+ enable-cache : true
38+
39+ - name : Install dependencies
40+ run : |
41+ uv sync --locked --all-extras
42+
43+ - name : Run example script
44+ env :
45+ LLM_API_KEY : ${{ secrets.OPENAI_API_KEY }}
46+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
47+ run : |
48+ uv run python examples/example.py
49+
You can’t perform that action at this time.
0 commit comments