Skip to content

Commit

Permalink
Followup fixes to new test suite/CI (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb authored Aug 15, 2024
1 parent 21cbe55 commit 149e02c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # coverage: Issue detecting commit SHA
# We need the full history for update tests
fetch-depth: 0
fetch-tags: true

- name: Set up Python 3.12
uses: actions/setup-python@v5
Expand All @@ -29,13 +31,13 @@ jobs:
- name: Install Test Requirements
run: |
nox --force-color -e tests-3 --install-only
nox --force-color -e tests --install-only
- name: Test
env:
SKIP_REQUIREMENTS_INSTALL: true
run: |
nox --force-color -e tests-3 -- -vv tests/
nox --force-color -e tests -- -vv tests/
# - name: Create CodeCov Flags
# if: always()
Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@ def project(answers, request, copie):
yield res.project_dir


@pytest.fixture
def project_committed(project):
with local.cwd(project):
git = local["git"]["-c", "commit.gpgsign=false"]
git = local["git"][
"-c", "commit.gpgsign=false", "-c", "user.name=foobar", "-c", "[email protected]"
]
git("init")
git("add", ".")
git("commit", "-m", "initial commit")
Expand Down
6 changes: 4 additions & 2 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ def test_update_from_002_works(copie, project):


def _commit_with_pre_commit(venv, max_retry=3, message="initial commit"):
git = local["git"]["-c", "commit.gpgsign=false"]
venv.run("pre-commit", "install")
git = local["git"][
"-c", "commit.gpgsign=false", "-c", "user.name=foobar", "-c", "[email protected]"
]
venv.run(venv.venv_python, "-m", "pre_commit", "install")
retry_count = 1
saved_err = None

Expand Down

0 comments on commit 149e02c

Please sign in to comment.