Skip to content

Commit e6d2eef

Browse files
committed
Better CI cleanliness
1 parent e038ed5 commit e6d2eef

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ jobs:
2727
pip install -e .[dev]
2828
- name: Run unit tests with pytest / pytest-copie
2929
run: |
30+
git config --global init.defaultBranch main
3031
python -m pytest --python_version ${{ matrix.python-version }}

.github/workflows/smoke-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
pip list
3939
- name: Run unit tests with pytest / pytest-copie
4040
run: |
41+
git config --global init.defaultBranch main
4142
python -m pytest --python_version ${{ matrix.python-version }}
4243
- name: Send status to Slack app
4344
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}

tests/test_package_creation.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pytest
77

8-
os.environ["SKIP"] = "no-commit-to-branch,check-added-large-files"
8+
os.environ["SKIP"] = "no-commit-to-branch"
99

1010

1111
def create_project_with_basic_checks(copie, extra_answers, package_name="example_package"):
@@ -52,10 +52,6 @@ def create_project_with_basic_checks(copie, extra_answers, package_name="example
5252
assert all_found
5353

5454
## Initialize local git repository and add ALL new files to it.
55-
git_results = subprocess.run(
56-
["git", "config", "--global", "init.defaultBranch", "main"], cwd=result.project_dir, check=False
57-
)
58-
assert git_results.returncode == 0
5955
git_results = subprocess.run(["git", "init", "."], cwd=result.project_dir, check=False)
6056
assert git_results.returncode == 0
6157
git_results = subprocess.run(["git", "add", "."], cwd=result.project_dir, check=False)

0 commit comments

Comments
 (0)