Skip to content

Commit

Permalink
configure python workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrrt committed Jan 5, 2025
1 parent 7b92909 commit cc2618f
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: sdk-python

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Install dependencies
run: uv sync

- name: Run tests
run: pytest test/
4 changes: 3 additions & 1 deletion python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ profile.json
# macOS
**/.DS_Store

.env
.env

__pycache__/
10 changes: 10 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ dependencies = [
"requests>=2.32.3",
"websocket-client>=1.8.0",
]

[dependency-groups]
dev = [
"pytest>=8.3.4",
]

[tool.pytest.ini_options]
pythonpath = [
"."
]
6 changes: 6 additions & 0 deletions python/test/test_dummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def inc(x):
return x + 1


def test_answer():
assert inc(4) == 5
109 changes: 109 additions & 0 deletions python/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc2618f

Please sign in to comment.