Skip to content

Commit 952066f

Browse files
committed
add (bors-ignored) formatting check job
1 parent 25a43c7 commit 952066f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,34 @@ jobs:
9292
- name: Test
9393
run: bash ./ci.sh
9494

95+
fmt:
96+
name: Check formatting (ignored by bors)
97+
runs-on: ubuntu-latest
98+
steps:
99+
- uses: actions/checkout@v2
100+
- name: Install latest nightly
101+
uses: actions-rs/toolchain@v1
102+
with:
103+
toolchain: nightly
104+
components: rustfmt
105+
override: true
106+
- name: Check formatting (miri)
107+
uses: actions-rs/cargo@v1
108+
with:
109+
command: fmt
110+
args: --all -- --check
111+
- name: Check formatting (cargo-miri)
112+
uses: actions-rs/cargo@v1
113+
with:
114+
command: fmt
115+
args: --manifest-path cargo-miri/Cargo.toml --all -- --check
116+
95117
# These jobs doesn't actually test anything, but they're only used to tell
96118
# bors the build completed, as there is no practical way to detect when a
97119
# workflow is successful listening to webhooks only.
98120
#
99121
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
122+
# (`fmt` is deliberately not listed, we want bors to ignore it.)
100123
end-success:
101124
name: bors build finished
102125
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)