Skip to content

Commit

Permalink
Followup fixes to new test suite/CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb committed Aug 15, 2024
1 parent 21cbe55 commit 34238c8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ jobs:
- name: Install Test Requirements
run: |
nox --force-color -e tests-3 --install-only
nox --force-color -e tests --install-only
- name: Prepare Git for tests
# We need the tags in the local repo to be able
# to run update tests
run: |
git fetch --tags
- 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 34238c8

Please sign in to comment.