Skip to content

Commit cde0da8

Browse files
author
Mathias BIGAIGNON
committed
Fixing CI/CD
1 parent 7d1dfd8 commit cde0da8

File tree

3 files changed

+22
-33
lines changed

3 files changed

+22
-33
lines changed

.github/workflows/testing-and-quality.yml

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,31 @@ permissions:
88
contents: read
99

1010
jobs:
11-
test:
11+
code-quality:
12+
name: "Code QA"
1213
strategy:
1314
fail-fast: false
1415
matrix:
1516
python-version: [3.12]
16-
poetry-version: [1.8.3]
1717
os: [ubuntu-latest]
1818
runs-on: ${{ matrix.os }}
1919
steps:
2020
- uses: actions/checkout@v4
21-
- name: Setup Python
22-
uses: actions/setup-python@v3
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
2323
with:
24-
python-version: ${{ matrix.python-version }}
25-
- name: Setup Poetry
26-
uses: abatilo/actions-poetry@v2.0.0
27-
with:
28-
poetry-version: ${{ matrix.poetry-version }}
24+
version: "0.6.11"
25+
python-version-file: "pyproject.toml"
2926
- name: Install dependencies
30-
run: poetry install --with dev
31-
- name: Run tests
32-
run: poetry run pytest --cov=entitled --cov-report=xml tests/
27+
run: uv sync --all-extras --dev
28+
- name: Run ruff linter
29+
run: uv run ruff check entitled
30+
- name: Run ruff formater
31+
run: uv run ruff format entitled
32+
- name: Run bandit
33+
run: uv run bandit entitled
3334

34-
code-quality:
35+
test:
3536
strategy:
3637
fail-fast: false
3738
matrix:
@@ -41,21 +42,12 @@ jobs:
4142
runs-on: ${{ matrix.os }}
4243
steps:
4344
- uses: actions/checkout@v4
44-
- name: Setup Python
45-
uses: actions/setup-python@v3
46-
with:
47-
python-version: ${{ matrix.python-version }}
48-
- name: Setup Poetry
49-
uses: abatilo/actions-poetry@v2.0.0
45+
- name: Install uv
46+
uses: astral-sh/setup-uv@v5
5047
with:
51-
poetry-version: ${{ matrix.poetry-version }}
48+
version: "0.6.11"
49+
python-version-file: "pyproject.toml"
5250
- name: Install dependencies
53-
run: poetry install --with dev
54-
- name: Run black
55-
run: poetry run black . --check
56-
- name: Run isort
57-
run: poetry run isort . --check-only
58-
- name: Run pylint
59-
run: poetry run pylint entitled
60-
- name: Run bandit
61-
run: poetry run bandit entitled
51+
run: uv sync --all-extras --dev
52+
- name: Run tests
53+
run: uv run pytest --cov=entitled --cov-report=xml tests/

entitled/policies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Any, TypeVar
44

55
from entitled import exceptions
6-
from entitled.response import Err, Ok, Response
6+
from entitled.response import Err, Response
77
from entitled.rules import Rule, RuleProto
88

99
T = TypeVar("T")

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ dev = [
2222
"uvloop>=0.21.0",
2323
]
2424

25-
[tool.isort]
26-
profile = "ruff"
27-
2825
[build-system]
2926
requires = ["hatchling"]
3027
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)