@@ -11,94 +11,64 @@ jobs:
1111 name : Lint
1212 runs-on : ubuntu-latest
1313 steps :
14- - uses : actions/checkout@v3
14+ - uses : actions/checkout@v4
1515
1616 - name : Set up Python
17- uses : actions/setup-python@v4
17+ uses : actions/setup-python@v5
1818 with :
1919 python-version : " 3.11"
2020
21- - name : Install Poetry
22- uses : snok/install-poetry@v1
21+ - name : Install uv
22+ uses : astral-sh/setup-uv@v3
2323 with :
24- version : 1.7.1
25- virtualenvs-create : true
26- virtualenvs-in-project : true
27-
28- - name : Load cached venv
29- id : cached-poetry-dependencies
30- uses : actions/cache@v3
31- with :
32- path : .venv
33- key : venv-${{ runner.os }}-3.11-${{ hashFiles('**/poetry.lock') }}
24+ enable-cache : true
25+ cache-dependency-glob : " pyproject.toml"
3426
3527 - name : Install dependencies
36- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
37- run : poetry install --no-interaction --no-root
38-
39- - name : Install project
4028 run : |
41- poetry install --no-interaction
42- poetry run pip install -e .
43-
29+ uv sync --all-extras --dev
30+
4431 - name : Check code formatting
4532 run : |
46- source .venv/bin/activate
47- poetry run ruff format .
33+ uv run ruff format --check .
4834
4935 - name : Run linter
5036 run : |
51- source .venv/bin/activate
52- poetry run ruff check .
37+ uv run ruff check .
5338
5439 - name : Type check
5540 run : |
56- source .venv/bin/activate
57- poetry run mypy commitloom tests
41+ uv run mypy commitloom tests
5842
5943 test :
6044 name : Test
6145 runs-on : ubuntu-latest
6246 strategy :
6347 matrix :
64- python-version : ["3.11 "]
48+ python-version : ["3.10", "3.11", "3.12 "]
6549 steps :
66- - uses : actions/checkout@v3
50+ - uses : actions/checkout@v4
6751
6852 - name : Set up Python ${{ matrix.python-version }}
69- uses : actions/setup-python@v4
53+ uses : actions/setup-python@v5
7054 with :
7155 python-version : ${{ matrix.python-version }}
7256
73- - name : Install Poetry
74- uses : snok/install-poetry@v1
57+ - name : Install uv
58+ uses : astral-sh/setup-uv@v3
7559 with :
76- version : 1.7.1
77- virtualenvs-create : true
78- virtualenvs-in-project : true
79-
80- - name : Load cached venv
81- id : cached-poetry-dependencies
82- uses : actions/cache@v3
83- with :
84- path : .venv
85- key : venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
60+ enable-cache : true
61+ cache-dependency-glob : " pyproject.toml"
8662
8763 - name : Install dependencies
88- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
89- run : poetry install --no-interaction --no-root
90-
91- - name : Install project
9264 run : |
93- poetry install --no-interaction
94- poetry run pip install -e .
65+ uv sync --all-extras --dev
9566
9667 - name : Run tests
9768 env :
9869 OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
9970 run : |
100- source .venv/bin/activate
101- poetry run pytest --cov=commitloom --cov-report=xml
71+ uv run pytest --cov=commitloom --cov-report=xml
10272
10373 - name : Upload coverage to Codecov
10474 uses : codecov/codecov-action@v5
@@ -110,22 +80,22 @@ jobs:
11080 name : Build Package
11181 runs-on : ubuntu-latest
11282 steps :
113- - uses : actions/checkout@v3
83+ - uses : actions/checkout@v4
11484
11585 - name : Set up Python
116- uses : actions/setup-python@v4
86+ uses : actions/setup-python@v5
11787 with :
11888 python-version : " 3.11"
11989
120- - name : Install Poetry
121- uses : snok/install-poetry@v1
90+ - name : Install uv
91+ uses : astral-sh/setup-uv@v3
12292 with :
123- version : 1.7.1
124- virtualenvs-create : true
125- virtualenvs-in-project : true
93+ enable-cache : true
94+ cache-dependency-glob : " pyproject.toml"
12695
12796 - name : Build package
128- run : poetry build
97+ run : |
98+ uv build
12999
130100 - name : Check dist contents
131101 run : |
0 commit comments