Skip to content

ci: Enforce version bump #9

ci: Enforce version bump

ci: Enforce version bump #9

Workflow file for this run

on:
pull_request:
push:
branches:
- main
name: Format, Lint and Test
jobs:
check:
name: Cargo Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo check
fmt:
name: Formatter Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo fmt --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo clippy --no-deps
check-bump:
name: Check Version Bump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check if version needs bumped
run: |
if ! git diff Cargo.toml; then
echo "ERROR You forgot to bump the version number in Cargo.toml!!!"
echo "ERROR Edit the version number in Cargo.toml, and then make a `chore:` commit and push it to fix this."
echo "ERROR Make sure you follow SemVer 2.0 when bumping the version number."
exit 1
# Note: This is very rudimentary check, but it is better than nothing.
fi
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo test