Skip to content

Commit

Permalink
Merge pull request #36 from kymppi/update-workflow
Browse files Browse the repository at this point in the history
chore(workflow): update workflow scrips
  • Loading branch information
Cliftonz authored Oct 23, 2023
2 parents d10b14a + 2006287 commit 8912984
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 32 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependency check
on:
pull_request:
paths:
- '**/Cargo.lock'
- '**/Cargo.toml'
- '**/deny.toml'
jobs:
cargo-deny:
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources

# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}

steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
35 changes: 11 additions & 24 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
name: Linting
on: [push, pull_request]

env:
RUSTFLAGS: '-Dwarnings'

jobs:
cargo-deny:
name: Cargo dependency linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
clippy:
name: Clippy linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
name: Clippy Output
- name: Run clippy
run: cargo clippy --all-targets --all-features
fmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
components: rustfmt
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Check formatting
run: cargo fmt --all -- --check
11 changes: 4 additions & 7 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ jobs:
- stable
- 1.63.0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
- name: Run tests
run: cargo test
2 changes: 1 addition & 1 deletion src/layouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl Layouts {
.await?;

match result {
Response::Success(data) => Ok(()),
Response::Success(_data) => Ok(()),
Response::Error(err) => match err.status_code {
401 => Err(NovuError::UnauthorizedError("/layouts".to_string())),
code => todo!("{}", code),
Expand Down

0 comments on commit 8912984

Please sign in to comment.