Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add running cargo-semver-checks on rust-libp2p to CI #180

Merged
merged 6 commits into from
Nov 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,42 @@ jobs:

- name: test
run: cargo test

# Run cargo-semver-checks on a crate with no semver violations,
# to make sure there are no false-positives.
run-on-crate:
name: Run cargo-semver-checks on rust-libp2p 0.47.0
runs-on: ubuntu-latest
steps:
- name: Checkout cargo-semver-checks
uses: actions/checkout@v3
with:
persist-credentials: false

# In this particular version, a feature adds an enum variant.
# Reference: https://github.com/obi1kenobi/cargo-semver-check/issues/147
- name: Checkout rust-libp2p
uses: actions/checkout@v3
with:
persist-credentials: false
repository: 'libp2p/rust-libp2p'
ref: '3371d7ceab242440216ae9ab99829631fa418f3b'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider leaving some documentation (as comments near here and near the top of the job) describing why this particular commit is interesting and worth testing?

path: 'crate'

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
profile: minimal
override: true

# rust-libp2p requires protobuf-compiler.
- name: Install protobuf-compiler
run: sudo apt install protobuf-compiler
obi1kenobi marked this conversation as resolved.
Show resolved Hide resolved

- name: Run semver-checks
run: cargo run semver-checks check-release --manifest-path="crate/core/Cargo.toml"
obi1kenobi marked this conversation as resolved.
Show resolved Hide resolved

publish:
name: Publish to crates.io
Expand Down