Skip to content

Commit 13b56bf

Browse files
committed
chore(ci): release update
1 parent 3e063b3 commit 13b56bf

File tree

4 files changed

+40
-37
lines changed

4 files changed

+40
-37
lines changed

.github/workflows/ci.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
steps:
7070
- name: Install additional dependencies
7171
run: sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 libmariadb-dev
72-
72+
7373
- uses: actions/checkout@v4
7474

7575
- name: Set up Python
@@ -86,27 +86,27 @@ jobs:
8686
- name: Run tests with coverage tracking
8787
run: uv run pytest -k elasticsearch
8888

89-
sonar:
90-
needs:
91-
- test
92-
- test_elasticsearch
93-
if: github.event.pull_request.head.repo.fork == false && github.repository_owner == 'litestar-org'
94-
runs-on: ubuntu-latest
95-
steps:
96-
- name: Check out repository
97-
uses: actions/checkout@v4
98-
with:
99-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
100-
- name: Download Artifacts
101-
uses: actions/download-artifact@v4
102-
with:
103-
name: coverage-xml
104-
105-
- name: Fix coverage file for sonarcloud
106-
run: sed -i "s/home\/runner\/work\/pytest-databases\/pytest-databases/github\/workspace/g" coverage.xml
107-
108-
- name: SonarCloud Scan
109-
uses: sonarsource/sonarcloud-github-action@master
110-
env:
111-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
89+
# sonar:
90+
# needs:
91+
# - test
92+
# - test_elasticsearch
93+
# if: github.event.pull_request.head.repo.fork == false && github.repository_owner == 'litestar-org'
94+
# runs-on: ubuntu-latest
95+
# steps:
96+
# - name: Check out repository
97+
# uses: actions/checkout@v4
98+
# with:
99+
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
100+
# - name: Download Artifacts
101+
# uses: actions/download-artifact@v4
102+
# with:
103+
# name: coverage-xml
104+
105+
# - name: Fix coverage file for sonarcloud
106+
# run: sed -i "s/home\/runner\/work\/pytest-databases\/pytest-databases/github\/workspace/g" coverage.xml
107+
108+
# - name: SonarCloud Scan
109+
# uses: sonarsource/sonarcloud-github-action@master
110+
# env:
111+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/release.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
id-token: write
1313
environment: release
1414
steps:
15+
- name: Install additional dependencies
16+
run: sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 libmariadb-dev
17+
1518
- name: Check out repository
1619
uses: actions/checkout@v4
1720

src/pytest_databases/_service.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
from contextlib import AbstractContextManager, contextmanager
99
from typing import TYPE_CHECKING, Any, Callable, Generator
1010

11-
import docker
1211
import filelock
1312
import pytest
14-
from docker.errors import ImageNotFound
1513
from typing_extensions import Self
1614

15+
import docker
16+
from docker.errors import ImageNotFound
1717
from pytest_databases.helpers import get_xdist_worker_id
1818
from pytest_databases.types import ServiceContainer
1919

@@ -149,15 +149,15 @@ def run(
149149
try:
150150
self._client.images.get(image)
151151
except ImageNotFound:
152-
self._client.images.pull(*image.rsplit(":", maxsplit=1))
152+
self._client.images.pull(*image.rsplit(":", maxsplit=1)) # pyright: ignore[reportCallIssue,reportArgumentType]
153153

154154
if container is None:
155-
container = self._client.containers.run(
155+
container = self._client.containers.run( # pyright: ignore[reportCallIssue,reportArgumentType]
156156
image,
157157
command,
158158
detach=True,
159159
remove=True,
160-
ports={container_port: None},
160+
ports={container_port: None}, # pyright: ignore[reportArgumentType]
161161
labels=["pytest_databases"],
162162
name=name,
163163
environment=env,
@@ -204,9 +204,9 @@ def run(
204204
try:
205205
container.stop()
206206
container.remove(force=True)
207-
except docker.errors.APIError as exc:
207+
except docker.errors.APIError as exc: # pyright: ignore[reportAttributeAccessIssue]
208208
# '409 - Conflict' means removal is already in progress. this is the
209-
# safest way of delaing with it, since the API is a bit borked when it
209+
# safest way of delaiyng with it, since the API is a bit borked when it
210210
# comes to concurrent requests
211211
if exc.status_code not in {409, 404}:
212212
raise

src/pytest_databases/docker/mysql.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ def check(_service: ServiceContainer) -> bool:
5252
password=password,
5353
)
5454
except mysql.connector.errors.OperationalError as exc:
55-
if "Lost connection" in exc.msg:
55+
if "Lost connection" in exc.msg: # type: ignore
5656
return False
5757
raise
5858

5959
try:
6060
with conn.cursor() as cursor:
6161
cursor.execute("select 1 as is_available")
6262
resp = cursor.fetchone()
63-
return resp is not None and resp[0] == 1
63+
return resp is not None and resp[0] == 1 # type: ignore
6464
finally:
6565
with contextlib.suppress(Exception):
6666
conn.close()
@@ -161,7 +161,7 @@ def mysql_56_connection(mysql_56_service: MySQLService) -> Generator[MySQLConnec
161161
database=mysql_56_service.db,
162162
password=mysql_56_service.password,
163163
) as conn:
164-
yield conn
164+
yield conn # type: ignore
165165

166166

167167
@pytest.fixture(scope="session")
@@ -173,7 +173,7 @@ def mysql_57_connection(mysql_57_service: MySQLService) -> Generator[MySQLConnec
173173
database=mysql_57_service.db,
174174
password=mysql_57_service.password,
175175
) as conn:
176-
yield conn
176+
yield conn # type: ignore
177177

178178

179179
@pytest.fixture(scope="session")
@@ -190,4 +190,4 @@ def mysql_8_connection(mysql_8_service: MySQLService) -> Generator[MySQLConnecti
190190
database=mysql_8_service.db,
191191
password=mysql_8_service.password,
192192
) as conn:
193-
yield conn
193+
yield conn # type: ignore

0 commit comments

Comments
 (0)