Skip to content

Commit

Permalink
Merge pull request #127 from lumeohq/dmitry/update-ci
Browse files Browse the repository at this point in the history
Update CI workflow
  • Loading branch information
DmitrySamoylov authored Apr 17, 2024
2 parents 8585974 + 06a3ef7 commit 7718a04
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 30 deletions.
72 changes: 42 additions & 30 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,49 @@ on:

jobs:
build:
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build

test:
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
- name: Run tests (no default features)
run: cargo test -p onvif --no-default-features

clippy:
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Catch common mistakes
run: cargo clippy --workspace --tests --all-targets -- -D warnings

rustfmt:
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal
components: rustfmt, clippy
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Check (no default features)
uses: actions-rs/cargo@v1
with:
command: test
args: -p onvif --no-default-features
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Catch common mistakes
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"

members = [
"onvif",
Expand Down

0 comments on commit 7718a04

Please sign in to comment.