Skip to content

Commit 1f3dd8a

Browse files
committed
ci: update workflow to enforce formatting
1 parent 57bf200 commit 1f3dd8a

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/test_build_release.yml

+20-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,23 @@ name: CI
44
on: [push, pull_request]
55

66
jobs:
7+
format:
8+
runs-on: ubuntu-latest
9+
env:
10+
CARGO_TERM_COLOR: always
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions-rs/toolchain@v1
14+
with:
15+
profile: minimal
16+
toolchain: stable
17+
components: rustfmt
18+
- uses: Swatinem/rust-cache@v1
19+
- name: Check Rust Formatting
20+
run: cargo fmt --check
21+
722
test:
23+
needs: format
824
runs-on: ubuntu-latest
925
env:
1026
CARGO_TERM_COLOR: always
@@ -18,7 +34,7 @@ jobs:
1834
- uses: Swatinem/rust-cache@v1
1935
- uses: taiki-e/install-action@cargo-llvm-cov
2036
- uses: taiki-e/install-action@nextest
21-
- name: Run tests
37+
- name: Run Tests
2238
run: cargo llvm-cov nextest
2339

2440
build:
@@ -37,9 +53,9 @@ jobs:
3753
profile: minimal
3854
toolchain: stable
3955
- uses: Swatinem/rust-cache@v1
40-
- name: Build torrust tracker
56+
- name: Build Torrust Tracker
4157
run: cargo build --release
42-
- name: Upload build artifact
58+
- name: Upload Build Artifact
4359
uses: actions/upload-artifact@v2
4460
with:
4561
name: torrust-tracker
@@ -49,7 +65,7 @@ jobs:
4965
needs: build
5066
runs-on: ubuntu-latest
5167
steps:
52-
- name: Download build artifact
68+
- name: Download Build Artifact
5369
uses: actions/download-artifact@v2
5470
with:
5571
name: torrust-tracker

0 commit comments

Comments
 (0)