Skip to content

Commit

Permalink
ci(tdd): fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
pinbraerts committed Dec 15, 2024
1 parent fb14c7c commit b177df6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- name: TDD check old tests
- name: TDD check new tests against old binary
run: |
first_commit_hash=$(git rev-list --max-parents=0 HEAD)
first_commit_message=$(git log -1 --pretty=%B $first_commit_hash)
case $first_commit_message in
case '${{ github.event.pull_request.title }}' in
fix*|feat*|bug*)
git checkout $first_commit_hash~1 -- tests
git reset --hard ${{ github.head_ref }}
cargo build --release
git checkout ${{ github.ref }} -- tests
!cargo test --verbose
;;
esac

0 comments on commit b177df6

Please sign in to comment.