Skip to content

Commit 767d2f2

Browse files
authored
dx(backend): Disable pre-commit pytest hooks (#10003)
Running the tests locally takes a lot of time and leaves test data behind in the DB, making it impractical to actually run locally. I'm disabling the `pytest` hooks in the pre-commit config so the pre-commit checks can reasonably be used without significant negative impact to DX. This doesn't impact UX and there is nothing to test.
1 parent 4557813 commit 767d2f2

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

.pre-commit-config.yaml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -241,38 +241,38 @@ repos:
241241
language: system
242242
pass_filenames: false
243243

244-
- repo: local
245-
hooks:
246-
- id: pytest
247-
name: Run tests - AutoGPT Platform - Backend
248-
alias: pytest-platform-backend
249-
entry: bash -c 'cd autogpt_platform/backend && poetry run pytest'
250-
# include autogpt_libs source (since it's a path dependency) but exclude *_test.py files:
251-
files: ^autogpt_platform/(backend/((backend|test)/|poetry\.lock$)|autogpt_libs/(autogpt_libs/.*(?<!_test)\.py|poetry\.lock)$)
252-
language: system
253-
pass_filenames: false
244+
# - repo: local
245+
# hooks:
246+
# - id: pytest
247+
# name: Run tests - AutoGPT Platform - Backend
248+
# alias: pytest-platform-backend
249+
# entry: bash -c 'cd autogpt_platform/backend && poetry run pytest'
250+
# # include autogpt_libs source (since it's a path dependency) but exclude *_test.py files:
251+
# files: ^autogpt_platform/(backend/((backend|test)/|poetry\.lock$)|autogpt_libs/(autogpt_libs/.*(?<!_test)\.py|poetry\.lock)$)
252+
# language: system
253+
# pass_filenames: false
254254

255-
- id: pytest
256-
name: Run tests - Classic - AutoGPT (excl. slow tests)
257-
alias: pytest-classic-autogpt
258-
entry: bash -c 'cd classic/original_autogpt && poetry run pytest --cov=autogpt -m "not slow" tests/unit tests/integration'
259-
# include forge source (since it's a path dependency) but exclude *_test.py files:
260-
files: ^(classic/original_autogpt/((autogpt|tests)/|poetry\.lock$)|classic/forge/(forge/.*(?<!_test)\.py|poetry\.lock)$)
261-
language: system
262-
pass_filenames: false
255+
# - id: pytest
256+
# name: Run tests - Classic - AutoGPT (excl. slow tests)
257+
# alias: pytest-classic-autogpt
258+
# entry: bash -c 'cd classic/original_autogpt && poetry run pytest --cov=autogpt -m "not slow" tests/unit tests/integration'
259+
# # include forge source (since it's a path dependency) but exclude *_test.py files:
260+
# files: ^(classic/original_autogpt/((autogpt|tests)/|poetry\.lock$)|classic/forge/(forge/.*(?<!_test)\.py|poetry\.lock)$)
261+
# language: system
262+
# pass_filenames: false
263263

264-
- id: pytest
265-
name: Run tests - Classic - Forge (excl. slow tests)
266-
alias: pytest-classic-forge
267-
entry: bash -c 'cd classic/forge && poetry run pytest --cov=forge -m "not slow"'
268-
files: ^classic/forge/(forge/|tests/|poetry\.lock$)
269-
language: system
270-
pass_filenames: false
264+
# - id: pytest
265+
# name: Run tests - Classic - Forge (excl. slow tests)
266+
# alias: pytest-classic-forge
267+
# entry: bash -c 'cd classic/forge && poetry run pytest --cov=forge -m "not slow"'
268+
# files: ^classic/forge/(forge/|tests/|poetry\.lock$)
269+
# language: system
270+
# pass_filenames: false
271271

272-
- id: pytest
273-
name: Run tests - Classic - Benchmark
274-
alias: pytest-classic-benchmark
275-
entry: bash -c 'cd classic/benchmark && poetry run pytest --cov=benchmark'
276-
files: ^classic/benchmark/(agbenchmark/|tests/|poetry\.lock$)
277-
language: system
278-
pass_filenames: false
272+
# - id: pytest
273+
# name: Run tests - Classic - Benchmark
274+
# alias: pytest-classic-benchmark
275+
# entry: bash -c 'cd classic/benchmark && poetry run pytest --cov=benchmark'
276+
# files: ^classic/benchmark/(agbenchmark/|tests/|poetry\.lock$)
277+
# language: system
278+
# pass_filenames: false

0 commit comments

Comments
 (0)