cargo: begin development on v0.3 #120
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [ pull_request ] | |
jobs: | |
hooks: | |
name: Git Hooks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Parse MSRV | |
run: sed -n 's/^rust-version = "\(.*\)"$/RUSTUP_TOOLCHAIN=\1/p' Cargo.toml >> $GITHUB_ENV | |
- name: Install Rust Toolchain | |
run: rustup toolchain install $RUSTUP_TOOLCHAIN | |
- name: Install Clippy and Rustfmt | |
run: rustup component add clippy rustfmt | |
- name: Run hooks | |
run: | | |
base="${{ github.event.pull_request.base.sha }}" | |
head="${{ github.event.pull_request.head.sha }}" | |
git rev-list --reverse $base..$head | while read commit | |
do | |
echo ::group::Checking $commit | |
git reset $commit --hard | |
echo ::group::Running pre-commit | |
.githooks/pre-commit | |
echo ::endgroup:: | |
echo ::group::Running commit-msg | |
git log --format=format:%B -n1 > /tmp/commit_msg | |
.githooks/commit-msg /tmp/commit_msg | |
echo ::endgroup:: | |
echo ::endgroup:: | |
done |