Skip to content

Commit

Permalink
Move pylint_primer_tests into tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord committed May 28, 2022
1 parent bd60438 commit 76a4120
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/primer_run_main.yaml
Expand Up @@ -69,7 +69,7 @@ jobs:
id: cache-projects
uses: actions/cache@v3
with:
path: .pylint_primer_tests/
path: tests/.pylint_primer_tests/
key: >-
${{ runner.os }}-${{ matrix.python-version }}-${{
steps.commitstring.outputs.commitstring }}-primer
Expand All @@ -81,7 +81,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: primer_commitstring
path: .pylint_primer_tests/commit_string.txt
path: tests/.pylint_primer_tests/commit_string.txt

# Run primer
- name: Run pylint primer
Expand All @@ -93,4 +93,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: primer_output
path: .pylint_primer_tests/output_main.txt
path: tests/.pylint_primer_tests/output_main.txt
6 changes: 3 additions & 3 deletions .github/workflows/primer_run_pr.yaml
Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Copy and unzip the commit string
run: |
unzip primer_commitstring.zip
cp commit_string.txt .pylint_primer_tests/commit_string.txt
cp commit_string.txt tests/.pylint_primer_tests/commit_string.txt
- name: Unzip the output of 'main'
run: unzip primer_output_main.zip
- name: Get commit string
Expand All @@ -128,7 +128,7 @@ jobs:
id: cache-projects
uses: actions/cache@v3
with:
path: .pylint_primer_tests/
path: tests/.pylint_primer_tests/
key: >-
${{ runner.os }}-${{ matrix.python-version }}-${{
steps.commitstring.outputs.commitstring }}-primer
Expand All @@ -155,7 +155,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: primer_output_pr
path: .pylint_primer_tests/output_pr.txt
path: tests/.pylint_primer_tests/output_pr.txt
- name: Upload output of 'main'
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -17,6 +17,7 @@ doc/user_guide/messages/fatal/
doc/user_guide/messages/information/
doc/user_guide/messages/refactor/
doc/user_guide/messages/warning/
tests/.pylint_primer_tests/
pyve
build-stamp
.coverage
Expand All @@ -26,4 +27,3 @@ build-stamp
.pytest_cache/
.mypy_cache/
.benchmarks/
.pylint_primer_tests/
2 changes: 1 addition & 1 deletion pylint/testutils/primer.py
Expand Up @@ -9,7 +9,7 @@

import git

PRIMER_DIRECTORY_PATH = Path(".pylint_primer_tests")
PRIMER_DIRECTORY_PATH = Path("tests") / ".pylint_primer_tests"


class PackageToLint:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/primer/primer_tool.py
Expand Up @@ -15,8 +15,8 @@
from pylint.reporters import JSONReporter
from pylint.testutils.primer import PackageToLint

MAIN_DIR = Path(__file__).parent.parent.parent
PRIMER_DIRECTORY = MAIN_DIR / ".pylint_primer_tests/"
TESTS_DIR = Path(__file__).parent.parent
PRIMER_DIRECTORY = TESTS_DIR / ".pylint_primer_tests/"
PACKAGES_TO_PRIME_PATH = Path(__file__).parent / "packages_to_prime.json"


Expand Down
2 changes: 1 addition & 1 deletion tests/primer/test_primer_external.py
Expand Up @@ -14,7 +14,7 @@

from pylint.testutils.primer import PackageToLint

PRIMER_DIRECTORY = Path(".pylint_primer_tests/").resolve()
PRIMER_DIRECTORY = (Path("tests") / ".pylint_primer_tests/").resolve()


def get_packages_to_lint_from_json(json_path: Path | str) -> dict[str, PackageToLint]:
Expand Down

0 comments on commit 76a4120

Please sign in to comment.