-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from Colin-b/develop
Release 2.0.0.dev3
- Loading branch information
Showing
11 changed files
with
231 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[testing] | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov=keepachangelog --cov-fail-under=100 --cov-report=term-missing | ||
- name: Create packages | ||
run: | | ||
python -m pip install wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Publish packages | ||
run: | | ||
python -m pip install twine | ||
python -m twine upload dist/* --skip-existing --username __token__ --password ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[testing] | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov=keepachangelog --cov-fail-under=100 --cov-report=term-missing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 21.7b0 | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
import keepachangelog | ||
|
||
|
||
changelog_as_text = """# Changelog | ||
All notable changes to this project will be documented in this file. | ||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
## [1.2.0] - 2018-06-01 | ||
### Added | ||
- Enhancement 1 | ||
- sub enhancement 1 | ||
- sub enhancement 2 | ||
- Enhancement 2 | ||
### Changed | ||
- Release note 1. | ||
- Release note 2. | ||
### Deprecated | ||
- Deprecated feature 1 | ||
- Future removal 2 | ||
### Fixed | ||
- Bug fix 1 | ||
- sub bug 1 | ||
- sub bug 2 | ||
- Bug fix 2 | ||
### Removed | ||
- Deprecated feature 2 | ||
- Future removal 1 | ||
### Security | ||
- Known issue 1 | ||
- Known issue 2 | ||
## [1.1.0] - 2018-05-31 | ||
### Changed | ||
- Enhancement 1 (1.1.0) | ||
- sub enhancement 1 | ||
- sub enhancement 2 | ||
- Enhancement 2 (1.1.0) | ||
## [1.0.1] - 2018-05-31 | ||
### Fixed | ||
- Bug fix 1 (1.0.1) | ||
- sub bug 1 | ||
- sub bug 2 | ||
- Bug fix 2 (1.0.1) | ||
## [1.0.0] - 2017-04-10 | ||
### Deprecated | ||
- Known issue 1 (1.0.0) | ||
- Known issue 2 (1.0.0) | ||
""" | ||
|
||
|
||
changelog_as_dict = { | ||
"1.2.0": { | ||
"added": [ | ||
"Enhancement 1", | ||
"sub enhancement 1", | ||
"sub enhancement 2", | ||
"Enhancement 2", | ||
], | ||
"changed": ["Release note 1.", "Release note 2."], | ||
"deprecated": ["Deprecated feature 1", "Future removal 2"], | ||
"fixed": ["Bug fix 1", "sub bug 1", "sub bug 2", "Bug fix 2"], | ||
"removed": ["Deprecated feature 2", "Future removal 1"], | ||
"security": ["Known issue 1", "Known issue 2"], | ||
"metadata": { | ||
"release_date": "2018-06-01", | ||
"version": "1.2.0", | ||
"semantic_version": { | ||
"buildmetadata": None, | ||
"major": 1, | ||
"minor": 2, | ||
"patch": 0, | ||
"prerelease": None, | ||
}, | ||
}, | ||
}, | ||
"1.1.0": { | ||
"changed": [ | ||
"Enhancement 1 (1.1.0)", | ||
"sub enhancement 1", | ||
"sub enhancement 2", | ||
"Enhancement 2 (1.1.0)", | ||
], | ||
"metadata": { | ||
"release_date": "2018-05-31", | ||
"version": "1.1.0", | ||
"semantic_version": { | ||
"buildmetadata": None, | ||
"major": 1, | ||
"minor": 1, | ||
"patch": 0, | ||
"prerelease": None, | ||
}, | ||
}, | ||
}, | ||
"1.0.1": { | ||
"fixed": [ | ||
"Bug fix 1 (1.0.1)", | ||
"sub bug 1", | ||
"sub bug 2", | ||
"Bug fix 2 (1.0.1)", | ||
], | ||
"metadata": { | ||
"release_date": "2018-05-31", | ||
"version": "1.0.1", | ||
"semantic_version": { | ||
"buildmetadata": None, | ||
"major": 1, | ||
"minor": 0, | ||
"patch": 1, | ||
"prerelease": None, | ||
}, | ||
}, | ||
}, | ||
"1.0.0": { | ||
"deprecated": ["Known issue 1 (1.0.0)", "Known issue 2 (1.0.0)"], | ||
"metadata": { | ||
"release_date": "2017-04-10", | ||
"version": "1.0.0", | ||
"semantic_version": { | ||
"buildmetadata": None, | ||
"major": 1, | ||
"minor": 0, | ||
"patch": 0, | ||
"prerelease": None, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
|
||
def test_changelog_dont_have_2_newline_at_eof(): | ||
assert keepachangelog.from_dict(changelog_as_dict) == changelog_as_text |