Skip to content

Commit

Permalink
remove unused deps in rust crates (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid authored Jun 1, 2024
1 parent c9a7666 commit 8ca42af
Show file tree
Hide file tree
Showing 25 changed files with 402 additions and 4,143 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on: [pull_request]
on:
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

name: tests
jobs:
Expand Down Expand Up @@ -36,48 +37,49 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v3
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./target
key: ${{ matrix.os }}-geyser-plugin-runner-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}-0001
target
key: ${{ matrix.os }}-cargo-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}-0000
restore-keys: |
${{ matrix.os }}-geyser-plugin-runner
${{ matrix.os }}-cargo-${{ hashFiles('rust-toolchain.toml') }}
- name: Set rust version
run: |
RUST_VERSION="$(./ci/rust-version.sh)"
RUST_VERSION="$(grep -oP 'channel = "\K\d\.\d+\.\d+(?=")' rust-toolchain.toml)"
echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV"
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
profile: minimal
components: clippy, rustfmt

- name: Enter the geyser-plugin-runner directory
run: cd geyser-plugin-runner
components: clippy

- name: cargo tree
run: |
cargo tree
git checkout Cargo.lock
cargo tree --frozen --offline
- name: Run fmt
run: cargo fmt --all -- --check
- name: cargo fmt
run: cargo +nightly fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --tests -- -Dwarnings
run: cargo clippy --workspace --all-targets --tests -- -Dwarnings

- name: Run test
run: cargo test --all-targets
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.car
_site
/.cargo
/target
Loading

0 comments on commit 8ca42af

Please sign in to comment.