Skip to content

Commit 7e0f278

Browse files
committed
Use universal formatting CI check
1 parent 758b1ab commit 7e0f278

File tree

2 files changed

+21
-28
lines changed

2 files changed

+21
-28
lines changed

.github/workflows/format.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Continuous integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Format:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: "Checkout repo"
10+
uses: actions/checkout@v4
11+
- name: "Install nix"
12+
uses: DeterminateSystems/determinate-nix-action@main
13+
- name: "Use nix cache"
14+
uses: DeterminateSystems/magic-nix-cache-action@main
15+
- name: Run treefmt
16+
run: nix develop --command treefmt-nix --ci
17+
- uses: reviewdog/action-suggester@v1
18+
with:
19+
fail_on_error: true
20+
github_token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
21+
tool_name: treefmt-nix

.github/workflows/rust.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,6 @@ jobs:
4141
- name: Run tests
4242
run: RUST_LOG=debug bash contrib/test.sh
4343

44-
Format:
45-
runs-on: ubuntu-latest
46-
steps:
47-
- name: "Checkout repo"
48-
uses: actions/checkout@v4
49-
- name: "Install nightly toolchain"
50-
uses: dtolnay/rust-toolchain@nightly
51-
with:
52-
components: rustfmt
53-
- name: "Use cache"
54-
uses: Swatinem/rust-cache@v2
55-
- name: "Run formatting check"
56-
run: cargo fmt --all -- --check
57-
58-
Format-FFI:
59-
runs-on: ubuntu-latest
60-
steps:
61-
- name: "Checkout repo"
62-
uses: actions/checkout@v4
63-
- name: "Install nightly toolchain"
64-
uses: dtolnay/rust-toolchain@nightly
65-
with:
66-
components: rustfmt
67-
- name: "Use cache"
68-
uses: Swatinem/rust-cache@v2
69-
- name: "Run formatting check"
70-
run: cd payjoin-ffi && cargo fmt --all -- --check
71-
7244
Lint-FFI:
7345
runs-on: ubuntu-latest
7446
steps:

0 commit comments

Comments
 (0)