-
Notifications
You must be signed in to change notification settings - Fork 104
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 #220 from binomialstew/feature/infile-addition
Add 'infile' option
- Loading branch information
Showing
8 changed files
with
127 additions
and
9 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const fs = require('fs') | ||
const assert = require('assert') | ||
const yaml = require('yaml') | ||
|
||
const actionConfig = yaml.parse(fs.readFileSync('./action.yml', 'utf8')) | ||
|
||
const { | ||
OUTPUT_FILE = 'CHANGELOG.md', | ||
EXPECTED_FILE = 'test-input-file.md', | ||
} = process.env | ||
|
||
assert.ok(OUTPUT_FILE, 'Output file is not defined!') | ||
assert.ok(EXPECTED_FILE, 'Expected file is not defined!') | ||
|
||
/** | ||
* Test that the generated logs match the expected output | ||
*/ | ||
console.log(`Going to test file "${OUTPUT_FILE}" against expected "${EXPECTED_FILE}"`) | ||
|
||
const outputFileContent = fs.readFileSync(OUTPUT_FILE.trim(), 'utf8').split('\n'); | ||
assert.ok(outputFileContent, 'Content could not be parsed!') | ||
console.log(`"${OUTPUT_FILE}" has valid content`, outputFileContent) | ||
|
||
const expectedFileContent = fs.readFileSync(EXPECTED_FILE.trim(), 'utf8').split('\n'); | ||
assert.ok(expectedFileContent, 'Content could not be parsed!') | ||
console.log(`"${EXPECTED_FILE}" has valid content`, expectedFileContent) | ||
|
||
const linesToCompare = 11 | ||
assert.deepStrictEqual(outputFileContent.slice(linesToCompare * -1), expectedFileContent.slice(linesToCompare * -1), 'Output-file does not contain the expected input-file content') | ||
console.log('The input-file\'s content exists at the end of the generated logs') |
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,11 @@ | ||
# This is content that will remain in the changelogs throughout all future releases | ||
|
||
## [1.0.0](https://github.com/TriPSs/conventional-changelog-action/compare/v3.18.0...v3.18.1) (2023-05-18) | ||
|
||
### Features | ||
|
||
* Make another commit | ||
|
||
### Bug Fixes | ||
|
||
* Make a preexisting commit |