Skip to content

Commit

Permalink
chore(fixtures): improve the workflow for test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Dec 7, 2021
1 parent de11cce commit 92a54d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
File renamed without changes.
16 changes: 11 additions & 5 deletions .github/workflows/test-fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Test fixtures

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test-fixtures:
Expand All @@ -13,7 +18,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set .gitconfig
- name: Set git config
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
Expand All @@ -37,9 +42,10 @@ jobs:
run: |
cd .workspace
fixtures_dir=${GITHUB_WORKSPACE}/.github/fixtures
cargo run -- --config "$fixtures_dir"/cliff.toml > "$fixtures_dir"/output.md
- name: Compare the output with the answer
docker run -t -v "$(pwd)/.git":/app/ orhunp/git-cliff:latest \
--config "$fixtures_dir/cliff.toml" > "$fixtures_dir/output.md"
- name: Compare the output with the expected output
run: |
cd .github/fixtures
cd ${GITHUB_WORKSPACE}/.github/fixtures
cat output.md
diff output.md answer.md
diff output.md expected.md

0 comments on commit 92a54d6

Please sign in to comment.