Skip to content

Commit

Permalink
add clippy to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcginty committed Feb 9, 2024
1 parent 15c7eb1 commit 6d8c2c5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Build
on:
push:
branches:
- '*'
- "*"
pull_request:
branches:
- '*'
- "*"

env:
CARGO_TERM_COLOR: always
Expand All @@ -20,15 +20,17 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- name: Install LLVM and Clang
if: startsWith(matrix.os, 'windows')
uses: KyleMayes/install-llvm-action@v1
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
if: startsWith(matrix.os, 'windows')
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: Run tests
run: bash ./ci-tests.sh
- uses: actions/checkout@v2
- name: Install LLVM and Clang
if: startsWith(matrix.os, 'windows')
uses: KyleMayes/install-llvm-action@v1
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
if: startsWith(matrix.os, 'windows')
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: Run tests
run: bash ./ci-tests.sh
- name: Run Clippy
run: cargo clippy --all-targets --all-features
1 change: 1 addition & 0 deletions ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ if ! rustc -vV | grep 'host: .*windows' &> /dev/null; then
fi
cargo test $TARGET --features "libsodium-resolver $COMMON_FEATURES"
cargo test $TARGET --features "libsodium-accelerated $COMMON_FEATURES"

3 changes: 2 additions & 1 deletion src/resolvers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ pub struct FallbackResolver {

impl FallbackResolver {
/// Create a new `FallbackResolver` that holds the primary and secondary resolver.
#[must_use] pub fn new(preferred: BoxedCryptoResolver, fallback: BoxedCryptoResolver) -> Self {
#[must_use]
pub fn new(preferred: BoxedCryptoResolver, fallback: BoxedCryptoResolver) -> Self {
Self { preferred, fallback }
}
}
Expand Down

0 comments on commit 6d8c2c5

Please sign in to comment.