Skip to content

Commit e9f752e

Browse files
authored
Merge pull request rust-bitcoin#25 from tcharding/12-06-fmt-in-ci
CI: Run the formatter
2 parents 25eb57e + 09dcdc4 commit e9f752e

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# corepc workflow notes
2+
3+
Because there are so many integration test jobs (one for each version
4+
of Core supported) we cannot stay under the 20 job limit.
5+
6+
ref: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
7+
8+
The minimal/recent lock files are handled by CI (`rust.yml`).
9+
10+
## Jobs
11+
12+
Run from `rust.yml` unless stated otherwise. Total 11 jobs.
13+
14+
0. `Prepare`
15+
1. `Stable - minimal`
16+
2. `Stable - recent`
17+
3. `Nightly - minimal`
18+
4. `Nightly - recent`
19+
5. `MSRV - minimal`
20+
6. `MSRV - recent`
21+
7. `Lint`
22+
8. `Docs`
23+
9. `Docsrs`
24+
10. `Format`
25+
26+
+1 job for each supported version of Core.
27+
28+

.github/workflows/rust.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,24 @@ jobs:
170170
- name: "Run test script"
171171
run: ./maintainer-tools/ci/run_task.sh docsrs
172172

173+
Format: # 1 job, run cargo fmt directly.
174+
name: Format - nightly toolchain
175+
needs: Prepare
176+
runs-on: ubuntu-latest
177+
strategy:
178+
fail-fast: false
179+
steps:
180+
- name: "Checkout repo"
181+
uses: actions/checkout@v4
182+
- name: "Select toolchain"
183+
uses: dtolnay/rust-toolchain@v1
184+
with:
185+
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
186+
- name: "Install rustfmt"
187+
run: rustup component add rustfmt
188+
- name: "Check formatting"
189+
run: cargo fmt --all -- --check
190+
173191
Integration: # 1 job for each bitcoind version we support.
174192
name: Integration tests - stable toolchain
175193
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)