diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bff5f91..60866b8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,3 +33,13 @@ jobs: run: cargo build --release --verbose - name: Run tests run: cargo test --verbose + - name: TDD check old tests + 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 + fix*|feat*|bug*) + git checkout $first_commit_hash~1 -- tests + !cargo test --verbose + ;; + esac