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

test: Make block-streamer unit-testable and add tests #442

Merged
merged 23 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
002fda0
refactor: Clean up `BlockStreamerClient` examples
morgsmccauley Dec 4, 2023
d10bd14
refactor: Allow injection of mock `DeltaLakeClient` into `BlockStream…
morgsmccauley Dec 4, 2023
0da377f
refactor: Make `RedisClient` mockable
morgsmccauley Dec 4, 2023
31b0bd9
refactor: Put `RedisClient` behind `Arc` to avoid implementing `Clone`
morgsmccauley Dec 9, 2023
f2f5d7a
refactor: Rename `RedisClientTrait` > `RedisOperations`
morgsmccauley Dec 9, 2023
50cd4d4
refactor: Rename `S3ClientTrait` > `S3Operations`
morgsmccauley Dec 9, 2023
034eb67
refactor: mock redis `impl` rather than `trait`
morgsmccauley Dec 9, 2023
57df44d
refactor: Mock s3 `impl` rather than `trait`
morgsmccauley Dec 10, 2023
f365b7d
refactor: Create `S3Client` from s3 config instead of aws config
morgsmccauley Dec 11, 2023
41c3437
refactor: Use `Arc` by value rather than reference
morgsmccauley Dec 11, 2023
14aa136
chore: Remove unused crates
morgsmccauley Dec 11, 2023
27a0ab7
chore: Upgrade `near-lake-framework`
morgsmccauley Dec 11, 2023
a09ee0c
refactor: Inject lake `S3Config` to allow it to be mocked
morgsmccauley Dec 11, 2023
c1c58f7
refactor: Make `DeltaLakeClient` mockable
morgsmccauley Dec 11, 2023
c8dbe23
feat: Add utils for mocking `near_lake_framework`
morgsmccauley Dec 11, 2023
d3af452
test: Test block stream
morgsmccauley Dec 11, 2023
849c53c
ci: Add CI for `block-streamer/`
morgsmccauley Dec 11, 2023
94262cc
fix: Formatting
morgsmccauley Dec 11, 2023
8dd9107
ci: Use rust `1.70.0`
morgsmccauley Dec 11, 2023
5de656b
ci: Install `protoc`
morgsmccauley Dec 11, 2023
d91d7af
test: Fix outcome reducer tests
morgsmccauley Dec 11, 2023
4b2f9c7
test: Add tests for `block_streamer_service`
morgsmccauley Dec 11, 2023
135c00d
chore: Pin `near-lake-framework` to specific version
morgsmccauley Dec 12, 2023
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
73 changes: 73 additions & 0 deletions .github/workflows/block-streamer-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Block Streamer

on:
push:
branches: [ main ]
paths:
- "block-streamer/**"
pull_request:
paths:
- "block-streamer/**"

env:
CARGO_TERM_COLOR: always

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Check
working-directory: ./block-streamer
run: cargo check

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Test
working-directory: ./block-streamer
run: cargo test


format:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
override: true
profile: minimal
components: rustfmt
- name: Check formatting
working-directory: ./block-streamer
run: |
cargo fmt -- --check

clippy:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
override: true
profile: minimal
components: clippy
- name: Clippy check
working-directory: ./block-streamer
run: |
cargo clippy
Loading
Loading