-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure workflows to match formatters
- Loading branch information
1 parent
b7e66a8
commit 8b53a35
Showing
3 changed files
with
79 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Documentation Workflow | ||
on: [push, pull_request] | ||
push: | ||
paths: | ||
- "docs/**" | ||
- "**.md" | ||
- "**.toml" | ||
pull_request: | ||
paths: | ||
- "docs/**" | ||
- "**.md" | ||
- "**.toml" | ||
|
||
jobs: | ||
# Run the dprint code formatter for documentation | ||
dprint: | ||
name: Dprint [Docs Formatter] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2.4.0 | ||
- name: Docs | Format | ||
uses: dprint/check@v2.0 | ||
|
||
# Run the `rustfmt` code formatter | ||
rustfmt: | ||
name: Rustfmt [Source Formatter] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2.4.0 | ||
|
||
- name: Setup | Rust | ||
uses: actions-rs/toolchain@v1.0.7 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: rustfmt | ||
|
||
- name: Setup | libdbus (ubuntu) | ||
run: sudo apt-get install libdbus-1-dev | ||
|
||
- name: Build | Format | ||
run: cargo fmt --all -- --check | ||
|
||
# Run the `clippy` linting tool | ||
clippy: | ||
name: Clippy [Linter] | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2.4.0 | ||
|
||
- name: Setup | Cache | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Setup | libdbus (ubuntu) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt-get install libdbus-1-dev | ||
|
||
- name: Setup | Rust | ||
uses: actions-rs/toolchain@v1.0.7 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: clippy | ||
|
||
- name: Build | Lint | ||
uses: actions-rs/cargo@v1.0.3 | ||
with: | ||
command: clippy | ||
args: --workspace --locked --all-targets --all-features -- -D clippy::all | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters