Skip to content

ci(github-actions): add back 3.7 runner to pythonpackage #456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
python-check:
strategy:
matrix:
python-version: [3.6, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ classifiers = [
]

[tool.poetry.dependencies]
python = "^3.6.1"
python = "^3.6.2"
questionary = "^1.4.0"
decli = "^0.5.2"
colorama = "^0.4.1"
Expand All @@ -57,7 +57,7 @@ argcomplete = "^1.12.1"

[tool.poetry.dev-dependencies]
ipython = "^7.2"
black = "^19.3b0"
black = "^21.12b0"
pytest = "^5.0"
flake8 = "^3.6"
pytest-cov = "^2.6"
Expand Down
6 changes: 5 additions & 1 deletion tests/commands/test_check_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ def test_check_conventional_commit_succeeds(mocker, capsys):


@pytest.mark.parametrize(
"commit_msg", ("feat!(lang): removed polish language", "no conventional commit",),
"commit_msg",
(
"feat!(lang): removed polish language",
"no conventional commit",
),
)
def test_check_no_conventional_commit(commit_msg, config, mocker, tmpdir):
with pytest.raises(InvalidCommitMessageError):
Expand Down
18 changes: 11 additions & 7 deletions tests/test_bump_find_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,20 @@ def test_generate_version(test_input, expected):


@pytest.mark.parametrize(
"test_input,expected", itertools.chain(local_versions),
"test_input,expected",
itertools.chain(local_versions),
)
def test_generate_version_local(test_input, expected):
current_version = test_input[0]
increment = test_input[1]
prerelease = test_input[2]
is_local_version = True
assert generate_version(
current_version,
increment=increment,
prerelease=prerelease,
is_local_version=is_local_version,
) == Version(expected)
assert (
generate_version(
current_version,
increment=increment,
prerelease=prerelease,
is_local_version=is_local_version,
)
== Version(expected)
)
5 changes: 4 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def test_commitizen_excepthook(capsys):
def test_commitizen_debug_excepthook(capsys):
with pytest.raises(SystemExit) as excinfo:
cli.commitizen_excepthook(
NotAGitProjectError, NotAGitProjectError(), "", debug=True,
NotAGitProjectError,
NotAGitProjectError(),
"",
debug=True,
)

assert excinfo.type == SystemExit
Expand Down
15 changes: 12 additions & 3 deletions tests/test_cz_conventional_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,18 @@ def test_info(config):
@pytest.mark.parametrize(
("commit_message", "expected_message"),
[
("test(test_scope): this is test msg", "this is test msg",),
("test(test_scope)!: this is test msg", "this is test msg",),
("test!(test_scope): this is test msg", "",),
(
"test(test_scope): this is test msg",
"this is test msg",
),
(
"test(test_scope)!: this is test msg",
"this is test msg",
),
(
"test!(test_scope): this is test msg",
"",
),
],
)
def test_process_commit(commit_message, expected_message, config):
Expand Down