1
1
mirror of https://github.com/orhun/git-cliff.git synced 2024-12-17 01:42:56 +03:00
git-cliff/.github/actions/run-fixtures-test/action.yml

51 lines
1.3 KiB
YAML
Raw Normal View History

feat(changelog, config)!: replace --topo-order by --date-order (#58) * feat(changelog, config)!: replace --topo-order by --date-order Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * ci: simplify test-fixtures workflow Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * ci: add fixtures tests of topo_order and date_order Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * remove unnecessary checkout Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * remove cargo run Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * set GIT_COMMITTER_DATE for each commit Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * add a test for --date-order arg Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * fix git config style Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * remove an unnecessary period Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * apply #60 Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * minify the config files for tests Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * fix git config style Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * fix styles of expected.md Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * make some steps one-line Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * remove footers Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * remove newlines Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Revert "remove newlines" This reverts commit 802881523f7a52d2bbfd0b4d87373ba8be8dcb5c. * Revert "remove footers" This reverts commit 3d334cc9efe49696fb741b4358ba5a6aa50bad3a. * add trim and footer Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
2022-02-12 19:30:21 +03:00
name: Run a fixtures test
description: Run a fixtures test
inputs:
fixtures-dir:
description: Path to the fixtures directory
required: true
command:
description: The git-cliff command to run
required: false
default: ""
runs:
using: composite
steps:
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Install git-cliff
run: cargo install --path git-cliff/
shell: bash
- name: Set git config
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
shell: bash
- name: Create commits and tags
working-directory: ${{ inputs.fixtures-dir }}
run: |
git init
./commit.sh
shell: bash
- name: Generate a changelog
working-directory: ${{ inputs.fixtures-dir }}
run: git cliff --config cliff.toml ${{ inputs.command }} > output.md
shell: bash
- name: Compare the output with the expected output
working-directory: ${{ inputs.fixtures-dir }}
run: |
cat output.md
diff --strip-trailing-cr output.md expected.md
shell: bash