Skip to content

Commit b474196

Browse files
chore: clean-up circleci validate (#631)
1 parent 696fb97 commit b474196

File tree

3 files changed

+0
-54
lines changed

3 files changed

+0
-54
lines changed

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ jobs:
3636

3737
- run: uv run --frozen pre-commit run --show-diff-on-failure --color=always --all-files --source ${{ github.event.pull_request.base.sha || github.event.before }} --origin ${{ github.event.pull_request.head.sha || github.event.after }}
3838
shell: bash
39-
env:
40-
SKIP: circleci_validate
4139

4240
- uses: stefanzweifel/git-auto-commit-action@v5
4341
# Always commit changes even if pre-commit failed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ ARG CODEGEN_BOT_GHE_TOKEN=""
33
FROM ghcr.io/astral-sh/uv:python${PYTHON_VERSION}-bookworm-slim AS base_uv
44
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
55
ENV GITHUB_WORKSPACE=/workspace
6-
LABEL com.circleci.preserve-entrypoint=true
76
## Change the working directory to the `codegen-sdk` directory
87
FROM base_uv AS install-tools
98
RUN apt-get update && apt-get install -y build-essential curl git

tests/conftest.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
from pathlib import Path
32

43
import pytest
54

@@ -66,28 +65,6 @@ def pytest_addoption(parser) -> None:
6665
parser.addoption("--cli-api-key", action="store", type=str, default=None, help="Token necessary to access skills.")
6766

6867

69-
# content of conftest.py
70-
# def pytest_configure(config) -> None:
71-
# worker_id = os.environ.get("PYTEST_XDIST_WORKER")
72-
# if worker_id is not None:
73-
# os.makedirs("build/logs", exist_ok=True)
74-
# logging.basicConfig(
75-
# format=config.getini("log_file_format"),
76-
# filename=f"build/logs/tests_{worker_id}.log",
77-
# level=config.getini("log_file_level"),
78-
# )
79-
80-
81-
def is_git_lfs_pointer(file_path: Path) -> bool:
82-
"""Check if a file is a git LFS pointer file"""
83-
try:
84-
with open(file_path) as f:
85-
first_line = f.readline().strip()
86-
return first_line == "version https://git-lfs.github.com/spec/v1"
87-
except Exception:
88-
return False
89-
90-
9168
@pytest.hookimpl(hookwrapper=True)
9269
def pytest_runtest_makereport(item, call):
9370
outcome = yield
@@ -97,31 +74,3 @@ def pytest_runtest_makereport(item, call):
9774
if "NodeJS or npm is not installed" in str(report.longrepr):
9875
msg = "This test requires NodeJS and npm to be installed. Please install them before running the tests."
9976
raise RuntimeError(msg)
100-
101-
102-
# Lets not run if we are in CI
103-
104-
105-
IS_CI = os.getenv("CI") == "true" or os.getenv("CIRCLECI") == "true"
106-
107-
108-
@pytest.fixture(autouse=IS_CI)
109-
def skip_lfs_tests(request) -> None:
110-
"""Skip tests that depend on git LFS files if they haven't been pulled"""
111-
# Get the test module path
112-
test_path = Path(request.module.__file__)
113-
114-
# Only run for integration tests
115-
try:
116-
cwd = Path.cwd()
117-
except FileNotFoundError:
118-
return
119-
if not str(test_path).startswith(str(cwd / "tests" / "integration")):
120-
return
121-
122-
try:
123-
expected = request.getfixturevalue("expected")
124-
if isinstance(expected, Path) and is_git_lfs_pointer(expected):
125-
pytest.skip(f"Test requires git LFS file {expected} which hasn't been pulled")
126-
except Exception:
127-
pass

0 commit comments

Comments
 (0)