-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add test * put in quotes * local action * few assertions * add current branch back * use br as delimiter * update docs
- Loading branch information
1 parent
8d08e5a
commit 2a58bd4
Showing
3 changed files
with
43 additions
and
6 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,37 @@ | ||
name: 'test action' | ||
on: 'pull_request' | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get branch name | ||
id: get_branch_name | ||
uses: tj-actions/branch-names@v6 | ||
|
||
# use the action as it is on the current branch of this PR | ||
- name: Generate changelog | ||
id: changelog | ||
uses: ./ | ||
with: | ||
base: '2fd5d62' # first commit of this repo | ||
head: 'origin/${{ steps.get_branch_name.outputs.current_branch }}' | ||
|
||
- name: Assertions | ||
shell: python | ||
run: | | ||
changelog = """ | ||
${{ steps.changelog.outputs.changelog }} | ||
""" | ||
print(changelog) | ||
assert "## Features 🔨" in changelog | ||
assert "## Fixes 🐛" in changelog | ||
assert "## Other changes 📝" in changelog | ||
assert "## Chores 👷♂️" in changelog | ||
assert len(changelog.split("\n")) > 20 |
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 |
---|---|---|
|
@@ -30,11 +30,11 @@ The generated changelog | |
with: | ||
fetch-depth: 0 | ||
|
||
- uses: nielstenboom/[email protected].0 | ||
- uses: nielstenboom/[email protected].1 | ||
id: changelog | ||
with: | ||
base: main | ||
head: v1.0.0 | ||
base: v1.0.0 | ||
head: main | ||
|
||
- name: Get the changelog | ||
run: | | ||
|
@@ -53,7 +53,7 @@ NOTE: if you want to enter branches with forward slashes in them, you should add | |
fetch-depth: 0 | ||
|
||
# point to branch with forward slashes with 'origin' prepended | ||
- uses: nielstenboom/[email protected].0 | ||
- uses: nielstenboom/[email protected].1 | ||
id: changelog | ||
with: | ||
base: v1.0.0 | ||
|
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