Skip to content

Commit 1cc2986

Browse files
committed
Fix CI
1 parent 1548b03 commit 1cc2986

File tree

3 files changed

+550
-53
lines changed

3 files changed

+550
-53
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,32 @@ jobs:
4949
- name: Set up uv
5050
uses: astral-sh/setup-uv@v6
5151
with:
52-
cache-dependency-glob: |
53-
setup.py
5452
cache-suffix: ${{ matrix.python-version }}
5553
enable-cache: true
5654
version: "latest"
57-
55+
- name: Setup env
56+
run: uv sync
5857
- name: Invoke tests
5958
run: |
60-
59+
6160
# Propagate build matrix information.
6261
./devtools/setup_ci.sh
6362
6463
# Bootstrap environment.
65-
source bootstrap.sh
66-
64+
# source bootstrap.sh
65+
66+
# Run linter.
67+
uv run ruff check .
68+
69+
# Run type testing
70+
uv run mypy
71+
6772
# Report about the test matrix slot.
6873
echo "Invoking tests with CrateDB ${CRATEDB_VERSION}"
69-
70-
# Run linter.
71-
poe lint
74+
uv run coverage run -m pytest
7275
73-
# Run tests.
74-
coverage run bin/test -vvv
75-
7676
# Set the stage for uploading the coverage report.
77-
coverage xml
77+
uv run coverage xml
7878
7979
# https://github.com/codecov/codecov-action
8080
- name: Upload coverage results to Codecov

pyproject.toml

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ dependencies = [
3939
[dependency-groups]
4040
dev = [
4141
"certifi>=2025.10.5",
42+
"coverage>=7.11.0",
43+
"mypy>=1.18.2",
4244
"pytest>=8.4.2",
4345
"pytz>=2025.2",
46+
"ruff>=0.14.2",
4447
"setuptools>=80.9.0",
4548
"stopit>=1.1.2",
4649
"verlib2>=0.3.1",
@@ -67,65 +70,67 @@ non_interactive = true
6770
line-length = 80
6871

6972
extend-exclude = [
70-
"/example_*",
73+
"/example_*",
7174
]
7275

7376
lint.select = [
74-
# Builtins
75-
"A",
76-
# Bugbear
77-
"B",
78-
# comprehensions
79-
"C4",
80-
# Pycodestyle
81-
"E",
82-
# eradicate
83-
"ERA",
84-
# Pyflakes
85-
"F",
86-
# isort
87-
"I",
88-
# pandas-vet
89-
"PD",
90-
# return
91-
"RET",
92-
# Bandit
93-
"S",
94-
# print
95-
"T20",
96-
"W",
97-
# flake8-2020
98-
"YTT",
77+
# Builtins
78+
"A",
79+
# Bugbear
80+
"B",
81+
# comprehensions
82+
"C4",
83+
# Pycodestyle
84+
"E",
85+
# eradicate
86+
"ERA",
87+
# Pyflakes
88+
"F",
89+
# isort
90+
"I",
91+
# pandas-vet
92+
"PD",
93+
# return
94+
"RET",
95+
# Bandit
96+
"S",
97+
# print
98+
"T20",
99+
"W",
100+
# flake8-2020
101+
"YTT",
99102
]
100103

101104
lint.extend-ignore = [
102-
# Unnecessary variable assignment before `return` statement
103-
"RET504",
104-
# Unnecessary `elif` after `return` statement
105-
"RET505",
105+
# Unnecessary variable assignment before `return` statement
106+
"RET504",
107+
# Unnecessary `elif` after `return` statement
108+
"RET505",
106109
]
107110

108111
lint.per-file-ignores."example_*" = [
109-
"ERA001", # Found commented-out code
110-
"T201", # Allow `print`
112+
"ERA001", # Found commented-out code
113+
"T201", # Allow `print`
111114
]
112115
lint.per-file-ignores."devtools/*" = [
113-
"T201", # Allow `print`
116+
"T201", # Allow `print`
114117
]
115118
lint.per-file-ignores."examples/*" = [
116-
"ERA001", # Found commented-out code
117-
"T201", # Allow `print`
119+
"ERA001", # Found commented-out code
120+
"T201", # Allow `print`
118121
]
119122
lint.per-file-ignores."tests/*" = [
120-
"S106", # Possible hardcoded password assigned to argument: "password"
121-
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
123+
"S101", # Asserts.
124+
"S105", # Possible hardcoded password assigned to: "password"
125+
"S106", # Possible hardcoded password assigned to argument: "password"
126+
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
122127
]
123128
lint.per-file-ignores."src/crate/client/{connection.py,http.py}" = [
124-
"A004", # Import `ConnectionError` is shadowing a Python builtin
125-
"A005", # Import `ConnectionError` is shadowing a Python builtin
129+
"A004", # Import `ConnectionError` is shadowing a Python builtin
130+
"A005", # Import `ConnectionError` is shadowing a Python builtin
126131
]
127132
lint.per-file-ignores."tests/client/test_http.py" = [
128-
"A004", # Import `ConnectionError` is shadowing a Python builtin
133+
"A004", # Import `ConnectionError` is shadowing a Python builtin
129134
]
130135

131136

0 commit comments

Comments
 (0)