diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5f16a2..88e24f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: cache: "pip" - name: Install Dependencies run: | - python -m pip install -U pip pytest setuptools editables + python -m pip install -U pip pytest setuptools editables pytest-gitconfig pip install . - name: Install Mercurial shell: bash @@ -59,6 +59,4 @@ jobs: echo "username = \"John Doe \"" >> ~/.hgrc - name: Run Tests run: | - git config --global user.name "John Doe" - git config --global user.email "ci@test.org" pytest -vvv tests diff --git a/pyproject.toml b/pyproject.toml index 8dde151..dba52c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,6 +90,7 @@ source-includes = ["tests"] test = [ "pytest", "pytest-cov", + "pytest-gitconfig", "pytest-xdist", "setuptools", ] @@ -109,6 +110,7 @@ docs = [ [tool.pdm.scripts] build = "python scripts/build.py" docs = "mkdocs serve" +test = "pytest" [tool.coverage.report] exclude_lines = [ @@ -133,4 +135,4 @@ namespace_packages = true [[tool.mypy.overrides]] module = "pdm.backend._vendor.*" -ignore_errors = true \ No newline at end of file +ignore_errors = true diff --git a/tests/conftest.py b/tests/conftest.py index b91c4d3..9cd3daa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -23,8 +23,6 @@ def dist(tmp_path: Path) -> Path: @pytest.fixture def scm(fixture_project: Path) -> None: subprocess.check_call(["git", "init"]) - subprocess.check_call(["git", "config", "user.email", "you@any.com"]) - subprocess.check_call(["git", "config", "user.name", "Name"]) subprocess.check_call(["git", "add", "."]) subprocess.check_call(["git", "commit", "-m", "initial commit"]) subprocess.check_call(["git", "tag", "-a", "0.1.0", "-m", "version 0.1.0"])