Skip to content

Commit

Permalink
ci: don't use the unmaintained actions-rs actions
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Zak <[email protected]>
  • Loading branch information
rjzak committed Mar 2, 2024
1 parent 5fe7d4c commit 1406e49
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 37 deletions.
34 changes: 9 additions & 25 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: rustfmt
toolchain: stable
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Setup Rust toolchain
run: rustup show && rustup update
- name: cargo fmt
run: cargo fmt --all -- --check

clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: clippy
toolchain: stable
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Setup Rust toolchain
run: rustup show && rustup update
- name: cargo clippy
run: cargo clippy --workspace --all-features --tests -- -D warnings

readme:
name: cargo readme
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: dtolnay/rust-toolchain@stable
- run: cargo install cargo-readme
- run: cd ciborium-io && cargo readme > README.md
- run: cd ciborium-ll && cargo readme > README.md
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=${{ matrix.crates.name }}/Cargo.toml ${{ matrix.profile.flag }} --no-default-features --features=${{ matrix.crates.feat }}
- uses: dtolnay/rust-toolchain@${{ matrix.toolchain }}
- name: cargo test
run: cargo test --manifest-path=${{ matrix.crates.name }}/Cargo.toml ${{ matrix.profile.flag }} --no-default-features --features=${{ matrix.crates.feat }}
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions ciborium-ll/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ mod tests {

// Test decoding
let mut decoder = Decoder::from(&bytes[..]);
for header in headers.iter().cloned() {
assert_eq!(header, decoder.pull().unwrap());
for header in headers.iter() {
assert_eq!(*header, decoder.pull().unwrap());
}

// Test encoding
Expand Down
4 changes: 2 additions & 2 deletions ciborium/tests/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ fn test<T: Serialize + DeserializeOwned + Debug + Eq>(
match from_reader(&bytes[..]) {
Ok(x) if success => assert_eq!(item, x),
Ok(..) => panic!("unexpected success"),
Err(e) if success => Err(e).unwrap(),
Err(e) if success => panic!("{:?}", e),
Err(..) => (),
}

// Decode from value
match value.deserialized() {
Ok(x) if success => assert_eq!(item, x),
Ok(..) => panic!("unexpected success"),
Err(e) if success => Err(e).unwrap(),
Err(e) if success => panic!("{:?}", e),
Err(..) => (),
}
}

0 comments on commit 1406e49

Please sign in to comment.