Merge pull request #18 from GuyPaddock/fix/cuda-device-weights-valida… #138
This file contains hidden or 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: commitlint | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| conventional-commits: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust (for cocogitto build) | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install cocogitto | |
| run: cargo install cocogitto --locked | |
| - name: Lint commits since latest tag (baseline policy) | |
| shell: bash | |
| run: | | |
| set -e | |
| latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || true) | |
| if [ -n "$latest_tag" ]; then | |
| echo "Found latest tag: $latest_tag" | |
| cog check --from-latest-tag | |
| echo "Contextual log since $latest_tag:"; | |
| git log --pretty=format:'%h %s' "$latest_tag"..HEAD || true | |
| else | |
| echo "No tags found. Skipping Conventional Commits check until a baseline tag is created." | |
| echo "To enable enforcement, create a baseline tag on main, e.g.:" | |
| echo " git tag -a cc-baseline -m 'Conventional Commits baseline' && git push origin cc-baseline" | |
| fi |