Skip to content

Metdata: make message clonable #302

Metdata: make message clonable

Metdata: make message clonable #302

Workflow file for this run

# Source:
# https://github.com/solana-labs/solana-accountsdb-plugin-postgres/blob/master/.github/workflows/test.yml
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set rust version
run: |
source ci/rust-version.sh
echo "RUST_STABLE=$rust_stable" | tee -a $GITHUB_ENV
- name: Set env vars
run: |
source ci/env.sh
echo "GEYSER_PLUGIN_NAME=$plugin_name" | tee -a $GITHUB_ENV
echo "GEYSER_PLUGIN_LIB=lib${plugin_lib_name}" | tee -a $GITHUB_ENV
- if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev libssl-dev libsasl2-dev libzstd-dev
# The toolchain action should definitely be run before the cache action
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.RUST_STABLE }}
components: rustfmt, clippy
# fresh install is faster than using the cache (11 secs vs 1 minute)
cache: false
# avoid the default "-D warnings" which thrashes cache
rustflags: ""
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run fmt+clippy
run: |
cargo fmt --all --check
cargo clippy --workspace --all-targets
- name: Build
run: |
cargo build --all-targets