Skip to content

Commit 0b31b1c

Browse files
authored
Merge pull request #1 from leansoler/feature/github-action-lint
Adding a Github workflow to lint and test the code
2 parents 4122ec6 + 6a95852 commit 0b31b1c

4 files changed

Lines changed: 51 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Continuous Integration
2+
# This workflow runs on every push and pull request to the main branch.
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
ci:
12+
name: Continuous Integration
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v6
20+
with:
21+
version: "0.7.6"
22+
enable-cache: true
23+
cache-dependency-glob: "uv.lock"
24+
25+
- name: "Set up Python"
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version-file: ".python-version"
29+
30+
- name: "Install the project dependencies"
31+
run: uv sync --locked --all-extras --dev
32+
33+
- name: "Run the linter"
34+
run: uv run ruff check
35+
36+
- name: "Run the tests"
37+
run: uv run pytest

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ readme = "README.md"
66
requires-python = ">=3.12"
77
dependencies = [
88
"google-adk>=1.3.0",
9-
"pytest>=8.4.0",
10-
"ruff>=0.11.13",
119
]
1210

1311
[tool.ruff]
1412
line-length = 100
1513

1614
[tool.ruff.lint]
1715
select = ["E", "F", "W", "I"]
16+
17+
[dependency-groups]
18+
dev = [
19+
"pytest>=8.4.0",
20+
"ruff>=0.11.13",
21+
]

tests/test_agent.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import pytest
2-
31
from git_diff_critique_agent import agent
42

53

uv.lock

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)