Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: don't use the unmaintained actions-rs actions #120

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(..) => (),
}
}
Loading