Skip to content

Commit

Permalink
Add SemVer compatibility checks to CI
Browse files Browse the repository at this point in the history
We recently introduced release branches that need to remain backwards
compatible. However, even small changes to item visibility during
backporting fixes might introduce SemVer violations (see
https://doc.rust-lang.org/cargo/reference/semver.html#change-categories
for a list of changs that would be considered major/minor).

To make sure we don't accidentally introduce such changes in the
backports, we here add a new `semver-checks` CI job that utilizes
`cargo-semver-checks`
(https://github.com/obi1kenobi/cargo-semver-checks), and have it run on
any push or pull requests towards anything else but `main`/`master`
(i.e., all feature branches to come).
  • Loading branch information
tnull committed Jan 24, 2025
1 parent 86308e1 commit d478c21
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/semver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: SemVer checks
on:
push:
branches-ignore:
- master
- main
pull_request:
branches-ignore:
- master
- main

jobs:
semver-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Rust stable toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
rustup override set stable
- name: Check SemVer with default features
uses: obi1kenobi/cargo-semver-checks-action@v2
feature-group: default-features

0 comments on commit d478c21

Please sign in to comment.