Skip to content

Commit 37312e4

Browse files
committed
ci: add lint workflow (anthropics#206)
1 parent 49d8409 commit 37312e4

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/ci.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
lint:
12+
name: lint
13+
runs-on: ubuntu-latest
14+
if: github.repository == 'anthropics/anthropic-sdk-python'
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Install Rye
20+
run: |
21+
curl -sSf https://rye-up.com/get | bash
22+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
23+
env:
24+
RYE_VERSION: 0.15.2
25+
RYE_INSTALL_OPTION: "--yes"
26+
27+
- name: Install dependencies
28+
run: |
29+
rye sync --all-features
30+
31+
- name: Run type checking
32+
run: |
33+
rye run typecheck
34+
35+
- name: Ensure importable
36+
run: |
37+
rye run python -c 'import anthropic'

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.9.18

0 commit comments

Comments
 (0)