Skip to content

Add home-assistant to primer and remove old external primer #8612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/workflows/primer-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,35 +96,3 @@ jobs:
. venv/bin/activate
pip install -e .
pytest -m primer_stdlib --primer-stdlib -n auto -vv

pytest-primer-external-batch-one:
name: run on batch one / ${{ matrix.python-version }} / Linux
runs-on: ubuntu-latest
timeout-minutes: 60
needs: prepare-tests-linux
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
steps:
- name: Check out code from GitHub
uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Restore Python virtual environment
id: cache-venv
uses: actions/[email protected]
with:
path: venv
fail-on-cache-miss: true
key:
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.prepare-tests-linux.outputs.python-key }}
- name: Run pytest
run: |
. venv/bin/activate
pip install -e .
pytest -m primer_external_batch_one --primer-external -n auto -vv
2 changes: 1 addition & 1 deletion pylint/testutils/_primer/primer_prepare_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def run(self) -> None:
elif self.config.make_commit_string:
for package, data in self.packages.items():
remote_sha1_commit = (
Git().ls_remote(data.url, data.branch).split("\t")[0]
Git().ls_remote(data.url, data.branch).split("\t")[0][:8]
)
print(f"'{package}' remote is at commit '{remote_sha1_commit}'.")
commit_string += remote_sha1_commit + "_"
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ addopts = "--strict-markers"
filterwarnings = "error"
markers = [
"primer_stdlib: Checks for crashes and errors when running pylint on stdlib",
"primer_external_batch_one: Checks for crashes and errors when running pylint on external libs (batch one)",
"benchmark: Baseline of pylint performance, if this regress something serious happened",
"timeout: Marks from pytest-timeout.",
"needs_two_cores: Checks that need 2 or more cores to be meaningful",
Expand Down
15 changes: 0 additions & 15 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ def pytest_addoption(parser: pytest.Parser) -> None:
default=False,
help="Run primer stdlib tests",
)
parser.addoption(
"--primer-external",
action="store_true",
default=False,
help="Run primer external tests",
)
parser.addoption(
"--minimal-messages-config",
action="store_true",
Expand All @@ -107,15 +101,6 @@ def pytest_collection_modifyitems(
config: pytest.Config, items: list[pytest.Function]
) -> None:
"""Convert command line options to markers."""
# Add skip_primer_external mark
if not config.getoption("--primer-external"):
skip_primer_external = pytest.mark.skip(
reason="need --primer-external option to run"
)
for item in items:
if "primer_external_batch_one" in item.keywords:
item.add_marker(skip_primer_external)

# Add skip_primer_stdlib mark
if not config.getoption("--primer-stdlib"):
skip_primer_stdlib = pytest.mark.skip(
Expand Down
7 changes: 0 additions & 7 deletions tests/primer/packages_to_lint_batch_one.json

This file was deleted.

5 changes: 5 additions & 0 deletions tests/primer/packages_to_prime.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"directories": ["src/flask"],
"url": "https://github.com/pallets/flask"
},
"home-assistant": {
"branch": "dev",
"directories": ["homeassistant"],
"url": "https://github.com/home-assistant/core.git"
},
"music21": {
"branch": "master",
"directories": ["music21"],
Expand Down
73 changes: 0 additions & 73 deletions tests/primer/test_primer_external.py

This file was deleted.