Skip to content

Commit 911dd33

Browse files
committed
Merge #3: Add Github workflows for test, fmt, clippy, PR and Issue templates
89aa6f0 docs: update README (Vihiga Tyonum) 10dccdb feat(git-workflow): add audit, zizmor & dependabot (Vihiga Tyonum) cbba98c remove integration test workflow (Vihiga Tyonum) 6e940f7 improve lib meta data (Vihiga Tyonum) 748456e feat(git-workflow): harmonize toolchain (Vihiga Tyonum) 6e9730c feat(git-workflow): add issues template (Vihiga Tyonum) ed39a3e add integration tests workflow (Vihiga Tyonum) 8c70671 add pull request template and changelog (Vihiga Tyonum) Pull request description: <!-- You can erase any parts of this template not applicable to your Pull Request. --> ### Description Fixes #2 This PR adds a PR template, issue template, workflows for testing, fmt, and clippy. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: ValuedMammal: reACK 89aa6f0 oleonardolima: utACK 89aa6f0 Tree-SHA512: a70614de56a67004e1acb8cfab14a6889bde639728721c1dc815a67db85aa6fafcf97447db795c337d9d21c505e3b9a55795cb40e6d87e4575fa374ff1ccab3c
2 parents 3f60fd7 + 89aa6f0 commit 911dd33

File tree

15 files changed

+433
-13
lines changed

15 files changed

+433
-13
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
**To Reproduce**
14+
<!-- Steps or code to reproduce the behavior. -->
15+
16+
**Expected behavior**
17+
<!-- A clear and concise description of what you expected to happen. -->
18+
19+
**Build environment**
20+
- BDK-RPC-CLIENT tag/commit: <!-- e.g. v0.13.0, 3a07614 -->
21+
- OS+version: <!-- e.g. ubuntu 20.04.01, macOS 12.0.1, windows -->
22+
- Rust/Cargo version: <!-- e.g. 1.56.0 -->
23+
- Rust/Cargo target: <!-- e.g. x86_64-apple-darwin, x86_64-unknown-linux-gnu, etc. -->
24+
25+
**Additional context**
26+
<!-- Add any other context about the problem here. -->
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Enhancement request
3+
about: Request a new feature or change to an existing feature
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the enhancement**
11+
<!-- A clear and concise description of what you would like added or changed. -->
12+
13+
**Use case**
14+
<!-- Tell us how you or others will use this new feature or change to an existing feature. -->
15+
16+
**Additional context**
17+
<!-- Add any other context about the enhancement here. -->
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: Minor Release
3+
about: Create a new minor release [for release managers only]
4+
title: 'Release MAJOR.MINOR+1.0'
5+
labels: 'release'
6+
assignees: ''
7+
8+
---
9+
10+
## Create a new minor release
11+
12+
### Summary
13+
14+
<--release summary to be used in announcements-->
15+
16+
### Commit
17+
18+
<--latest commit ID to include in this release-->
19+
20+
### Changelog
21+
22+
<--add notices from PRs merged since the prior release, see ["keep a changelog"]-->
23+
24+
### Checklist
25+
26+
Release numbering must follow [Semantic Versioning]. These steps assume the current `master`
27+
branch **development** version is *MAJOR.MINOR.0*.
28+
29+
#### On the day of the feature freeze
30+
31+
Change the `master` branch to the next MINOR+1 version:
32+
33+
- [ ] Switch to the `master` branch.
34+
- [ ] Create a new PR branch called `bump_dev_MAJOR_MINOR+1`, eg. `bump_dev_0_22`.
35+
- [ ] Bump the `bump_dev_MAJOR_MINOR+1` branch to the next development MINOR+1 version.
36+
- Change the `Cargo.toml` version value to `MAJOR.MINOR+1.0`.
37+
- The commit message should be "Bump version to MAJOR.MINOR+1.0".
38+
- [ ] Create PR and merge the `bump_dev_MAJOR_MINOR+1` branch to `master`.
39+
- Title PR "Bump version to MAJOR.MINOR+1.0".
40+
41+
#### On the day of the release
42+
43+
Tag and publish new release:
44+
45+
- [ ] Double check that your local `master` is up-to-date with the upstream repo.
46+
- [ ] Create a new branch called `release/MAJOR.MINOR+1` from `master`.
47+
- [ ] Add a tag to the `HEAD` commit in the `release/MAJOR.MINOR+1` branch.
48+
- The tag name should be `vMAJOR.MINOR+1.0`
49+
- The first line of the tag message should be "Release MAJOR.MINOR+1.0".
50+
- In the body of the tag message put a copy of the **Summary** and **Changelog** for the release.
51+
- Make sure the tag is signed, for extra safety use the explicit `--sign` flag.
52+
- [ ] Wait for the CI to finish one last time.
53+
- [ ] Push the new tag to the `bitcoindevkit/bdk_rpc_client` repo.
54+
- [ ] Publish **all** the updated crates to crates.io.
55+
- [ ] Create the release on GitHub.
56+
- Go to "tags", click on the dots on the right and select "Create Release".
57+
- Set the title to `Release MAJOR.MINOR+1.0`.
58+
- In the release notes body put the **Summary** and **Changelog**.
59+
- Use the "+ Auto-generate release notes" button to add details from included PRs.
60+
- Until we reach a `1.0.0` release check the "Pre-release" box.
61+
- [ ] Make sure the new release shows up on [crates.io] and that the docs are built correctly on [docs.rs].
62+
- [ ] Announce the release, using the **Summary**, on Discord, Twitter and Mastodon.
63+
- [ ] Celebrate 🎉
64+
65+
[Semantic Versioning]: https://semver.org/
66+
[crates.io]: https://crates.io/crates/bdk_rpc_client
67+
[docs.rs]: https://docs.rs/bdk_rpc_client/latest/bdk_rpc_client
68+
["keep a changelog"]: https://keepachangelog.com/en/1.0.0/
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
name: Patch Release
3+
about: Create a new patch release [for release managers only]
4+
title: 'Release MAJOR.MINOR.PATCH+1'
5+
labels: 'release'
6+
assignees: ''
7+
8+
---
9+
10+
## Create a new patch release
11+
12+
### Summary
13+
14+
<--release summary to be used in announcements-->
15+
16+
### Commit
17+
18+
<--latest commit ID to include in this release-->
19+
20+
### Changelog
21+
22+
<--add notices from PRs merged since the prior release, see ["keep a changelog"]-->
23+
24+
### Checklist
25+
26+
Release numbering must follow [Semantic Versioning]. These steps assume the current `master`
27+
branch **development** version is *MAJOR.MINOR.PATCH*.
28+
29+
### On the day of the patch release
30+
31+
Change the `master` branch to the new PATCH+1 version:
32+
33+
- [ ] Switch to the `master` branch.
34+
- [ ] Create a new PR branch called `bump_dev_MAJOR_MINOR_PATCH+1`, eg. `bump_dev_0_22_1`.
35+
- [ ] Bump the `bump_dev_MAJOR_MINOR` branch to the next development PATCH+1 version.
36+
- Change the `Cargo.toml` version value to `MAJOR.MINOR.PATCH+1`.
37+
- The commit message should be "Bump version to MAJOR.MINOR.PATCH+1".
38+
- [ ] Create PR and merge the `bump_dev_MAJOR_MINOR_PATCH+1` branch to `master`.
39+
- Title PR "Bump version to MAJOR.MINOR.PATCH+1".
40+
41+
Cherry-pick, tag and publish new PATCH+1 release:
42+
43+
- [ ] Merge fix PRs to the `master` branch.
44+
- [ ] Git cherry-pick fix commits to the `release/MAJOR.MINOR` branch to be patched.
45+
- [ ] Verify fixes in `release/MAJOR.MINOR` branch.
46+
- [ ] Bump the `release/MAJOR.MINOR.PATCH+1` branch to `MAJOR.MINOR.PATCH+1` version.
47+
- Change the `Cargo.toml` version value to `MAJOR.MINOR.MINOR.PATCH+1`.
48+
- The commit message should be "Bump version to MAJOR.MINOR.PATCH+1".
49+
- [ ] Add a tag to the `HEAD` commit in the `release/MAJOR.MINOR` branch.
50+
- The tag name should be `vMAJOR.MINOR.PATCH+1`
51+
- The first line of the tag message should be "Release MAJOR.MINOR.PATCH+1".
52+
- In the body of the tag message put a copy of the **Summary** and **Changelog** for the release.
53+
- Make sure the tag is signed, for extra safety use the explicit `--sign` flag.
54+
- [ ] Wait for the CI to finish one last time.
55+
- [ ] Push the new tag to the `bitcoindevkit/bdk_rpc_client` repo.
56+
- [ ] Publish **all** the updated crates to crates.io.
57+
- [ ] Create the release on GitHub.
58+
- Go to "tags", click on the dots on the right and select "Create Release".
59+
- Set the title to `Release MAJOR.MINOR.PATCH+1`.
60+
- In the release notes body put the **Summary** and **Changelog**.
61+
- Use the "+ Auto-generate release notes" button to add details from included PRs.
62+
- Until we reach a `1.0.0` release check the "Pre-release" box.
63+
- [ ] Make sure the new release shows up on [crates.io] and that the docs are built correctly on [docs.rs].
64+
- [ ] Announce the release, using the **Summary**, on Discord, Twitter and Mastodon.
65+
- [ ] Celebrate 🎉
66+
67+
[Semantic Versioning]: https://semver.org/
68+
[crates.io]: https://crates.io/crates/bdk_rpc_client
69+
[docs.rs]: https://docs.rs/bdk_rpc_client/latest/bdk_rpc_client
70+
["keep a changelog"]: https://keepachangelog.com/en/1.0.0/

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
enable-beta-ecosystems: true
3+
4+
updates:
5+
6+
- package-ecosystem: github-actions
7+
directory: "/"
8+
schedule:
9+
interval: daily
10+
time: "03:00"
11+
12+
- package-ecosystem: cargo
13+
directory: "/"
14+
schedule:
15+
interval: weekly
16+
day: monday
17+
time: "04:00"
18+

.github/pull_request_template.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
2+
3+
### Description
4+
5+
<!-- Describe the purpose of this PR, what's being adding and/or fixed -->
6+
7+
### Notes to the reviewers
8+
9+
<!-- In this section you can include notes directed to the reviewers, like explaining why some parts
10+
of the PR were done in a specific way -->
11+
12+
## Changelog notice
13+
14+
<!-- Notice the release manager should include in the release tag message changelog -->
15+
<!-- See https://keepachangelog.com/en/1.0.0/ for examples -->
16+
17+
### Checklists
18+
19+
#### All Submissions:
20+
21+
* [ ] I've signed all my commits
22+
* [ ] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
23+
* [ ] I ran `cargo fmt` and `cargo clippy` before committing
24+
25+
#### New Features:
26+
27+
* [ ] I've added tests for the new feature
28+
* [ ] I've added docs for the new feature
29+
* [ ] I've updated `CHANGELOG.md`
30+
31+
#### Bugfixes:
32+
33+
* [ ] This pull request breaks the existing API
34+
* [ ] I've added tests to reproduce the issue which are now passing
35+
* [ ] I'm linking the issue being fixed by this PR

.github/workflows/audit.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Security Audit
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/Cargo.toml'
7+
- '**/Cargo.lock'
8+
merge_group:
9+
push:
10+
branches: [master]
11+
paths:
12+
- '**/Cargo.toml'
13+
- '**/Cargo.lock'
14+
schedule:
15+
# weekly
16+
- cron: '0 0 * * 0'
17+
18+
env:
19+
CARGO_TERM_COLOR: always
20+
21+
permissions:
22+
contents: read
23+
security-events: write
24+
issues: write
25+
26+
jobs:
27+
cargo-audit:
28+
name: RustSec Audit (vulnerabilities)
29+
runs-on: ubuntu-latest
30+
timeout-minutes: 15
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34+
35+
- name: Install Rust toolchain
36+
uses: dtolnay/rust-toolchain@stable
37+
38+
- name: Cache cargo registry/index/target
39+
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1
40+
with:
41+
cache-on-failure: true
42+
43+
- name: Install cargo-audit
44+
run: cargo install cargo-audit --locked
45+
46+
- name: Run cargo audit (raw output — you will see this clearly)
47+
run: cargo audit --deny warnings
48+
49+
- name: Run cargo audit again for GitHub Security tab upload
50+
uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212ae3e3c0d700
51+
with:
52+
token: ${{ secrets.GITHUB_TOKEN }}
53+
deny: warnings
54+
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
on: [push, pull_request]
2+
3+
name: CI
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
RUST_BACKTRACE: 1
8+
9+
jobs:
10+
fmt:
11+
name: Rust fmt
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install Rust toolchain
18+
uses: actions-rust-lang/setup-rust-toolchain@v1
19+
with:
20+
toolchain: stable
21+
components: rustfmt
22+
cache: true
23+
24+
- name: Check fmt
25+
run: cargo fmt --all -- --check
26+
27+
# Clippy lints
28+
clippy:
29+
name: Clippy (${{ matrix.features }})
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
features:
34+
- --no-default-features
35+
- --all-features
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Install Rust toolchain
40+
uses: actions-rust-lang/setup-rust-toolchain@v1
41+
with:
42+
toolchain: stable
43+
components: clippy
44+
cache: true
45+
46+
- name: Run Clippy
47+
run: cargo clippy ${{ matrix.features }} --all-targets -- -D warnings
48+
49+
# Build and test
50+
test:
51+
name: Test (stable, ${{ matrix.features }})
52+
runs-on: ubuntu-latest
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
features:
57+
- --no-default-features
58+
- --all-features
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- name: Install Rust toolchain
63+
uses: actions-rust-lang/setup-rust-toolchain@v1
64+
with:
65+
toolchain: stable
66+
cache: true
67+
68+
- name: Build
69+
run: cargo build ${{ matrix.features }} --verbose
70+
71+
- name: Run unit tests
72+
run: cargo test ${{ matrix.features }} --lib --verbose
73+
74+
- name: Run doc tests
75+
run: cargo test ${{ matrix.features }} --doc --verbose
76+
77+
# MSRV
78+
msrv:
79+
name: MSRV
80+
runs-on: ubuntu-latest
81+
steps:
82+
- uses: actions/checkout@v4
83+
84+
- name: Install Rust toolchain
85+
uses: actions-rust-lang/setup-rust-toolchain@v1
86+
with:
87+
toolchain: 1.75.0
88+
cache: true
89+
90+
- name: Check MSRV
91+
run: cargo check --all-features

0 commit comments

Comments
 (0)