-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.04 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
- name: Get the changelog
run: |
cat << "EOF"
${{ steps.changelog.outputs.changelog }}
EOF