Skip to content

Commit

Permalink
Merge branch 'development' into add-gql-replication-types
Browse files Browse the repository at this point in the history
* development:
  Make clippy happy
  We can't drop a reference
  Fix merge conflict
  Doc strings for entry and log store structs (#126)
  Improve CI, track test coverage (#139)
  Fix high CPU usage of idle workers (#136)
  Define and implement `OperationStore` (#103)
  • Loading branch information
adzialocha committed May 31, 2022
2 parents 6a351c5 + 24c68a1 commit 1e2c30a
Show file tree
Hide file tree
Showing 31 changed files with 1,643 additions and 238 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2
160 changes: 145 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,160 @@
name: tests
name: aquadoggo

on: push

env:
CARGO_TERM_COLOR: always
cache_path: |
target
~/.cargo
cargo_manifest: aquadoggo/Cargo.toml

jobs:
test:
name: build and test

rust-test-sqlite:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Cargo caching
uses: actions/cache@v2
- name: Restore from cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: ${{ env.cache_path }}
key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }}

- name: Build
run: cargo build --verbose
- name: Build binary
uses: actions-rs/cargo@v1
with:
command: build
args: >-
--verbose
--manifest-path ${{ env.cargo_manifest }}
- name: Run tests
run: cargo test --verbose
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path ${{ env.cargo_manifest }}
# Ensure debug output is also tested
env:
RUST_LOG: debug

rust-check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Restore from cargo cache
uses: actions/cache@v3
with:
path: ${{ env.cache_path }}
key: ${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }}

- name: Check project and dependencies
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path ${{ env.cargo_manifest }}

rust-fmt:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true

- name: Restore from cargo cache
uses: actions/cache@v3
with:
path: ${{ env.cache_path }}
key: ${{ runner.os }}-fmt-${{ hashFiles('**/Cargo.lock') }}

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ${{ env.cargo_manifest }} -- --check

rust-clippy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true

- name: Restore from cargo cache
uses: actions/cache@v3
with:
path: ${{ env.cache_path }}
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}

- name: Check code with clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path ${{ env.cargo_manifest }} -- -D warnings --no-deps

rust-coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Restore from cargo cache
uses: actions/cache@v3
with:
path: ${{ env.cache_path }}
key: ${{ runner.os }}-tarpaulin-${{ hashFiles('**/Cargo.lock') }}

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
# Force cleaning via `--force-clean` flag to prevent buggy code coverage
args: --manifest-path ${{ env.cargo_manifest }} --locked --force-clean
# Ensure debug output is also tested
env:
RUST_LOG: debug

- name: Upload to codecov.io
uses: codecov/codecov-action@v2
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Refactor module structure, propagate errors in worker to service manager [#97](https://github.com/p2panda/aquadoggo/pull/97)
- Restructure storage modules and remove JSON RPC [#101](https://github.com/p2panda/aquadoggo/pull/101)
- Implement new methods required for replication defined by `EntryStore` trait [#102](https://github.com/p2panda/aquadoggo/pull/102)
- Implement SQL `OperationStore` [#103](https://github.com/p2panda/aquadoggo/pull/103)
- GraphQL client API with endpoint for retrieving next entry arguments [#119](https://github.com/p2panda/aquadoggo/pull/119)
- GraphQL endpoint for publishing entries [#123](https://github.com/p2panda/aquadoggo/pull/132)
- GraphQL endpoints for replication
Expand All @@ -27,7 +28,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improve `Signal` efficiency in `ServiceManager` [#95](https://github.com/p2panda/aquadoggo/pull/95)
- `EntryStore` improvements [#123](https://github.com/p2panda/aquadoggo/pull/123)
- Improvements for log and entry table layout [#124](https://github.com/p2panda/aquadoggo/issues/122)
- Update `StorageProvider` API after `p2panda-rs` changes [129](https://github.com/p2panda/aquadoggo/pull/129)
- Update `StorageProvider` API after `p2panda-rs` changes [#129](https://github.com/p2panda/aquadoggo/pull/129)

### Fixed

- Fix high CPU usage of idle workers [#136](https://github.com/p2panda/aquadoggo/pull/136)
- Improve CI, track test coverage [#139](https://github.com/p2panda/aquadoggo/pull/139)

## [0.2.0]

Expand Down
Loading

0 comments on commit 1e2c30a

Please sign in to comment.