Skip to content

Test Changelog Workflow #141

Test Changelog Workflow

Test Changelog Workflow #141

name: Test Changelog Workflow
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
pull_request:
branches: [ v1-master ]
paths:
- 'action.yml'
- '.github/workflows/test-changelog-workflow.yml'
jobs:
test-default-parameters:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Test Default Parameters
uses: ./
with:
auto-checkout: false
- name: Assert Changelog File Existence
shell: bash
run: |
if [ ! -f "CHANGELOG.md" ]; then
echo "CHANGELOG.md file does not exist"
exit 1
fi
- name: Assert Changelog File Not Empty
shell: bash
run: |
if [ ! -s "CHANGELOG.md" ]; then
echo "CHANGELOG.md file is empty"
exit 1
fi
test-custom-parameters:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Test Custom Parameters
uses: ./
with:
auto-checkout: false
output: custom-changelog.md
unreleased: true
commit-limit: 10
sort-commits: date-desc
hide-credit: true
- name: Assert Custom Changelog File Existence
shell: bash
run: |
if [ ! -f "custom-changelog.md" ]; then
echo "custom-changelog.md file does not exist"
exit 1
fi
- name: Assert Custom Changelog File Not Empty
shell: bash
run: |
if [ ! -s "custom-changelog.md" ]; then
echo "custom-changelog.md file is empty"
exit 1
fi
test-upload-artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Generate Changelog
uses: ./
with:
auto-checkout: false
upload-artifact: true
- name: Download Artifact
uses: actions/download-artifact@v7
with:
name: Changelog
- name: Assert Downloaded Artifact Not Empty
shell: bash
run: |
if [ ! -s "CHANGELOG.md" ]; then
echo "Downloaded CHANGELOG.md artifact is empty"
exit 1
fi
test-custom-artifact-name:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Generate Changelog
uses: ./
with:
auto-checkout: false
upload-artifact: true
artifact-name: Custom_Changelog
- name: Download Custom Artifact
uses: actions/download-artifact@v7
with:
name: Custom_Changelog
- name: Assert Downloaded Custom Artifact Not Empty
shell: bash
run: |
if [ ! -s "CHANGELOG.md" ]; then
echo "Downloaded custom CHANGELOG.md artifact is empty"
exit 1
fi