-
Notifications
You must be signed in to change notification settings - Fork 4
Add Github workflows for test, fmt, clippy, PR and Issue templates #3
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8c70671
add pull request template and changelog
tvpeter ed39a3e
add integration tests workflow
tvpeter 6e9730c
feat(git-workflow): add issues template
tvpeter 748456e
feat(git-workflow): harmonize toolchain
tvpeter 6e940f7
improve lib meta data
tvpeter cbba98c
remove integration test workflow
tvpeter 10dccdb
feat(git-workflow): add audit, zizmor & dependabot
tvpeter 89aa6f0
docs: update README
tvpeter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| --- | ||
| name: Bug report | ||
| about: Create a report to help us improve | ||
| title: '' | ||
| labels: 'bug' | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| **Describe the bug** | ||
| <!-- A clear and concise description of what the bug is. --> | ||
|
|
||
| **To Reproduce** | ||
| <!-- Steps or code to reproduce the behavior. --> | ||
|
|
||
| **Expected behavior** | ||
| <!-- A clear and concise description of what you expected to happen. --> | ||
|
|
||
| **Build environment** | ||
| - BDK-RPC-CLIENT tag/commit: <!-- e.g. v0.13.0, 3a07614 --> | ||
| - OS+version: <!-- e.g. ubuntu 20.04.01, macOS 12.0.1, windows --> | ||
| - Rust/Cargo version: <!-- e.g. 1.56.0 --> | ||
| - Rust/Cargo target: <!-- e.g. x86_64-apple-darwin, x86_64-unknown-linux-gnu, etc. --> | ||
|
|
||
| **Additional context** | ||
| <!-- Add any other context about the problem here. --> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| name: Enhancement request | ||
| about: Request a new feature or change to an existing feature | ||
| title: '' | ||
| labels: 'enhancement' | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| **Describe the enhancement** | ||
| <!-- A clear and concise description of what you would like added or changed. --> | ||
|
|
||
| **Use case** | ||
| <!-- Tell us how you or others will use this new feature or change to an existing feature. --> | ||
|
|
||
| **Additional context** | ||
| <!-- Add any other context about the enhancement here. --> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| --- | ||
| name: Minor Release | ||
| about: Create a new minor release [for release managers only] | ||
| title: 'Release MAJOR.MINOR+1.0' | ||
| labels: 'release' | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| ## Create a new minor release | ||
|
|
||
| ### Summary | ||
|
|
||
| <--release summary to be used in announcements--> | ||
|
|
||
| ### Commit | ||
|
|
||
| <--latest commit ID to include in this release--> | ||
|
|
||
| ### Changelog | ||
|
|
||
| <--add notices from PRs merged since the prior release, see ["keep a changelog"]--> | ||
|
|
||
| ### Checklist | ||
|
|
||
| Release numbering must follow [Semantic Versioning]. These steps assume the current `master` | ||
| branch **development** version is *MAJOR.MINOR.0*. | ||
|
|
||
| #### On the day of the feature freeze | ||
|
|
||
| Change the `master` branch to the next MINOR+1 version: | ||
|
|
||
| - [ ] Switch to the `master` branch. | ||
| - [ ] Create a new PR branch called `bump_dev_MAJOR_MINOR+1`, eg. `bump_dev_0_22`. | ||
| - [ ] Bump the `bump_dev_MAJOR_MINOR+1` branch to the next development MINOR+1 version. | ||
| - Change the `Cargo.toml` version value to `MAJOR.MINOR+1.0`. | ||
| - The commit message should be "Bump version to MAJOR.MINOR+1.0". | ||
| - [ ] Create PR and merge the `bump_dev_MAJOR_MINOR+1` branch to `master`. | ||
| - Title PR "Bump version to MAJOR.MINOR+1.0". | ||
|
|
||
| #### On the day of the release | ||
|
|
||
| Tag and publish new release: | ||
|
|
||
| - [ ] Double check that your local `master` is up-to-date with the upstream repo. | ||
| - [ ] Create a new branch called `release/MAJOR.MINOR+1` from `master`. | ||
| - [ ] Add a tag to the `HEAD` commit in the `release/MAJOR.MINOR+1` branch. | ||
| - The tag name should be `vMAJOR.MINOR+1.0` | ||
| - The first line of the tag message should be "Release MAJOR.MINOR+1.0". | ||
| - In the body of the tag message put a copy of the **Summary** and **Changelog** for the release. | ||
| - Make sure the tag is signed, for extra safety use the explicit `--sign` flag. | ||
| - [ ] Wait for the CI to finish one last time. | ||
| - [ ] Push the new tag to the `bitcoindevkit/bdk_rpc_client` repo. | ||
| - [ ] Publish **all** the updated crates to crates.io. | ||
| - [ ] Create the release on GitHub. | ||
| - Go to "tags", click on the dots on the right and select "Create Release". | ||
| - Set the title to `Release MAJOR.MINOR+1.0`. | ||
| - In the release notes body put the **Summary** and **Changelog**. | ||
| - Use the "+ Auto-generate release notes" button to add details from included PRs. | ||
| - Until we reach a `1.0.0` release check the "Pre-release" box. | ||
| - [ ] Make sure the new release shows up on [crates.io] and that the docs are built correctly on [docs.rs]. | ||
| - [ ] Announce the release, using the **Summary**, on Discord, Twitter and Mastodon. | ||
| - [ ] Celebrate 🎉 | ||
|
|
||
| [Semantic Versioning]: https://semver.org/ | ||
| [crates.io]: https://crates.io/crates/bdk_rpc_client | ||
| [docs.rs]: https://docs.rs/bdk_rpc_client/latest/bdk_rpc_client | ||
| ["keep a changelog"]: https://keepachangelog.com/en/1.0.0/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| --- | ||
| name: Patch Release | ||
| about: Create a new patch release [for release managers only] | ||
| title: 'Release MAJOR.MINOR.PATCH+1' | ||
| labels: 'release' | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| ## Create a new patch release | ||
|
|
||
| ### Summary | ||
|
|
||
| <--release summary to be used in announcements--> | ||
|
|
||
| ### Commit | ||
|
|
||
| <--latest commit ID to include in this release--> | ||
|
|
||
| ### Changelog | ||
|
|
||
| <--add notices from PRs merged since the prior release, see ["keep a changelog"]--> | ||
|
|
||
| ### Checklist | ||
|
|
||
| Release numbering must follow [Semantic Versioning]. These steps assume the current `master` | ||
| branch **development** version is *MAJOR.MINOR.PATCH*. | ||
|
|
||
| ### On the day of the patch release | ||
|
|
||
| Change the `master` branch to the new PATCH+1 version: | ||
|
|
||
| - [ ] Switch to the `master` branch. | ||
| - [ ] Create a new PR branch called `bump_dev_MAJOR_MINOR_PATCH+1`, eg. `bump_dev_0_22_1`. | ||
| - [ ] Bump the `bump_dev_MAJOR_MINOR` branch to the next development PATCH+1 version. | ||
| - Change the `Cargo.toml` version value to `MAJOR.MINOR.PATCH+1`. | ||
| - The commit message should be "Bump version to MAJOR.MINOR.PATCH+1". | ||
| - [ ] Create PR and merge the `bump_dev_MAJOR_MINOR_PATCH+1` branch to `master`. | ||
| - Title PR "Bump version to MAJOR.MINOR.PATCH+1". | ||
|
|
||
| Cherry-pick, tag and publish new PATCH+1 release: | ||
|
|
||
| - [ ] Merge fix PRs to the `master` branch. | ||
| - [ ] Git cherry-pick fix commits to the `release/MAJOR.MINOR` branch to be patched. | ||
| - [ ] Verify fixes in `release/MAJOR.MINOR` branch. | ||
| - [ ] Bump the `release/MAJOR.MINOR.PATCH+1` branch to `MAJOR.MINOR.PATCH+1` version. | ||
| - Change the `Cargo.toml` version value to `MAJOR.MINOR.MINOR.PATCH+1`. | ||
| - The commit message should be "Bump version to MAJOR.MINOR.PATCH+1". | ||
| - [ ] Add a tag to the `HEAD` commit in the `release/MAJOR.MINOR` branch. | ||
| - The tag name should be `vMAJOR.MINOR.PATCH+1` | ||
| - The first line of the tag message should be "Release MAJOR.MINOR.PATCH+1". | ||
| - In the body of the tag message put a copy of the **Summary** and **Changelog** for the release. | ||
| - Make sure the tag is signed, for extra safety use the explicit `--sign` flag. | ||
| - [ ] Wait for the CI to finish one last time. | ||
| - [ ] Push the new tag to the `bitcoindevkit/bdk_rpc_client` repo. | ||
| - [ ] Publish **all** the updated crates to crates.io. | ||
| - [ ] Create the release on GitHub. | ||
| - Go to "tags", click on the dots on the right and select "Create Release". | ||
| - Set the title to `Release MAJOR.MINOR.PATCH+1`. | ||
| - In the release notes body put the **Summary** and **Changelog**. | ||
| - Use the "+ Auto-generate release notes" button to add details from included PRs. | ||
| - Until we reach a `1.0.0` release check the "Pre-release" box. | ||
| - [ ] Make sure the new release shows up on [crates.io] and that the docs are built correctly on [docs.rs]. | ||
| - [ ] Announce the release, using the **Summary**, on Discord, Twitter and Mastodon. | ||
| - [ ] Celebrate 🎉 | ||
|
|
||
| [Semantic Versioning]: https://semver.org/ | ||
| [crates.io]: https://crates.io/crates/bdk_rpc_client | ||
| [docs.rs]: https://docs.rs/bdk_rpc_client/latest/bdk_rpc_client | ||
| ["keep a changelog"]: https://keepachangelog.com/en/1.0.0/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| version: 2 | ||
| enable-beta-ecosystems: true | ||
|
|
||
| updates: | ||
|
|
||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| time: "03:00" | ||
|
|
||
| - package-ecosystem: cargo | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| day: monday | ||
| time: "04:00" | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <!-- You can erase any parts of this template not applicable to your Pull Request. --> | ||
|
|
||
| ### Description | ||
|
|
||
| <!-- Describe the purpose of this PR, what's being adding and/or fixed --> | ||
|
|
||
| ### Notes to the reviewers | ||
|
|
||
| <!-- In this section you can include notes directed to the reviewers, like explaining why some parts | ||
| of the PR were done in a specific way --> | ||
|
|
||
| ## Changelog notice | ||
|
|
||
| <!-- Notice the release manager should include in the release tag message changelog --> | ||
| <!-- See https://keepachangelog.com/en/1.0.0/ for examples --> | ||
|
|
||
| ### Checklists | ||
|
|
||
| #### All Submissions: | ||
|
|
||
| * [ ] I've signed all my commits | ||
| * [ ] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) | ||
| * [ ] I ran `cargo fmt` and `cargo clippy` before committing | ||
|
|
||
| #### New Features: | ||
|
|
||
| * [ ] I've added tests for the new feature | ||
| * [ ] I've added docs for the new feature | ||
| * [ ] I've updated `CHANGELOG.md` | ||
|
|
||
| #### Bugfixes: | ||
|
|
||
| * [ ] This pull request breaks the existing API | ||
| * [ ] I've added tests to reproduce the issue which are now passing | ||
| * [ ] I'm linking the issue being fixed by this PR |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Security Audit | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '**/Cargo.toml' | ||
| - '**/Cargo.lock' | ||
| merge_group: | ||
| push: | ||
| branches: [master] | ||
| paths: | ||
| - '**/Cargo.toml' | ||
| - '**/Cargo.lock' | ||
| schedule: | ||
| # weekly | ||
| - cron: '0 0 * * 0' | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| issues: write | ||
|
|
||
| jobs: | ||
| cargo-audit: | ||
| name: RustSec Audit (vulnerabilities) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Cache cargo registry/index/target | ||
| uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 | ||
| with: | ||
| cache-on-failure: true | ||
|
|
||
| - name: Install cargo-audit | ||
| run: cargo install cargo-audit --locked | ||
|
|
||
| - name: Run cargo audit (raw output — you will see this clearly) | ||
| run: cargo audit --deny warnings | ||
|
|
||
| - name: Run cargo audit again for GitHub Security tab upload | ||
| uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212ae3e3c0d700 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| deny: warnings | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| on: [push, pull_request] | ||
|
|
||
| name: CI | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUST_BACKTRACE: 1 | ||
|
|
||
| jobs: | ||
| fmt: | ||
| name: Rust fmt | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: stable | ||
| components: rustfmt | ||
| cache: true | ||
|
|
||
| - name: Check fmt | ||
| run: cargo fmt --all -- --check | ||
|
|
||
| # Clippy lints | ||
| clippy: | ||
| name: Clippy (${{ matrix.features }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| features: | ||
| - --no-default-features | ||
| - --all-features | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: stable | ||
| components: clippy | ||
| cache: true | ||
|
|
||
| - name: Run Clippy | ||
| run: cargo clippy ${{ matrix.features }} --all-targets -- -D warnings | ||
|
|
||
| # Build and test | ||
| test: | ||
| name: Test (stable, ${{ matrix.features }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| features: | ||
| - --no-default-features | ||
| - --all-features | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: stable | ||
| cache: true | ||
|
|
||
| - name: Build | ||
| run: cargo build ${{ matrix.features }} --verbose | ||
|
|
||
| - name: Run unit tests | ||
| run: cargo test ${{ matrix.features }} --lib --verbose | ||
|
|
||
| - name: Run doc tests | ||
| run: cargo test ${{ matrix.features }} --doc --verbose | ||
|
|
||
| # MSRV | ||
| msrv: | ||
| name: MSRV | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: 1.75.0 | ||
| cache: true | ||
|
|
||
| - name: Check MSRV | ||
| run: cargo check --all-features |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: as a follow-up, we can probably use the other toolchain action so we don't need Swatinem/rust-cache, but don't want to keep bikeshedding on this one.