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 bf7a9f6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 38 deletions.
36 changes: 10 additions & 26 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,28 @@ 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
- run: cargo install cargo-readme
- uses: dtolnay/rust-toolchain@stable
- run: cargo +stable install cargo-readme
- run: cd ciborium-io && cargo readme > README.md
- run: cd ciborium-ll && cargo readme > README.md
- run: cd ciborium && cargo readme > README.md
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ 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 }}
- name: Install Rust
run: rustup toolchain install ${{ matrix.toolchain }}
- name: cargo test
run: cargo +${{ matrix.toolchain }} 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 bf7a9f6

Please sign in to comment.