Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 27 additions & 22 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ permissions:

on:
push:
branches: [ 'main' ]
branches: ["main"]
paths:
- 'python/**'
- "python/**"
pull_request:
branches: [ '*' ]
branches: ["*"]
paths:
- 'python/**'
- "python/**"

jobs:
lint:
Expand All @@ -21,16 +21,16 @@ jobs:
working-directory: ./python

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Install Ruff
uses: astral-sh/ruff-action@v3
- name: Install Ruff
uses: astral-sh/ruff-action@v3

- name: Ruff Format
run: ruff format --check --config ./pyproject.toml .
- name: Ruff Format
run: ruff format --check --config ./pyproject.toml .

- name: Ruff Lint
run: ruff check --config ./pyproject.toml .
- name: Ruff Lint
run: ruff check --config ./pyproject.toml .

unit_test:
runs-on: ubuntu-latest
Expand All @@ -39,19 +39,24 @@ jobs:
working-directory: ./python

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version-file: "./python/pyproject.toml"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version-file: "./python/pyproject.toml"

- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Install the project
run: uv sync --locked --all-extras --dev

- name: Run tests
run: uv run pytest
- name: Run tests
run: uv run pytest valuecell/core/ --cov=valuecell.core --cov-report=xml --cov-report=term

- name: Check coverage
run: |
uv run diff-cover coverage.xml --fail-under=90
2 changes: 2 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-asyncio>=1.0.0",
"diff-cover>=9.0.0",
]

[dependency-groups]
Expand All @@ -45,6 +46,7 @@ test = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-asyncio>=1.0.0",
"diff-cover>=9.0.0",
]

[tool.ruff]
Expand Down
30 changes: 30 additions & 0 deletions python/uv.lock

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