Skip to content

Commit

Permalink
Merge branch 'main' into graphql-replication-client
Browse files Browse the repository at this point in the history
* main:
  Update README.md
  UPSERT documents (#173)
  Run tests against PostgreSQL, fix compatibility (#170)
  End-to-end publishEntry tests (#167)
  Reschedule pending tasks during startup (#168)
  • Loading branch information
adzialocha committed Jun 27, 2022
2 parents cc6eca6 + a1e5973 commit 367389b
Show file tree
Hide file tree
Showing 35 changed files with 3,079 additions and 1,994 deletions.
57 changes: 54 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,58 @@ jobs:
with:
command: test
args: --manifest-path ${{ env.cargo_manifest }}
# Ensure debug output is also tested
env:
# Ensure debug output is also tested
RUST_LOG: debug

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

services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: aquadoggo-development
ports:
# Maps TCP port 5432 on service container to the host
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
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 }}-test-${{ hashFiles('**/Cargo.lock') }}

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
# Make sure the tests run consecutively to avoid accessing the same
# database by multiple test threads
args: >-
--manifest-path ${{ env.cargo_manifest }}
-- --test-threads 1
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/aquadoggo-development

rust-check:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -151,9 +199,12 @@ jobs:
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
args: >-
--manifest-path ${{ env.cargo_manifest }}
--locked
--force-clean
env:
# Ensure debug output is also tested
RUST_LOG: debug

- name: Upload to codecov.io
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Reduce and dependency tasks [#144](https://github.com/p2panda/aquadoggo/pull/144)
- GraphQL endpoints for replication [#100](https://github.com/p2panda/aquadoggo/pull/100)
- Inform materialization service about new operations [#161](https://github.com/p2panda/aquadoggo/pull/161)
- e2e publish entry tests [#167](https://github.com/p2panda/aquadoggo/pull/167)
- Reschedule pending tasks on startup [#168](https://github.com/p2panda/aquadoggo/pull/168)

### Changed

Expand All @@ -42,10 +44,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- 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)
- Fix compatibility with PostgreSQL, change sqlx runtime to `tokio` [#170](https://github.com/p2panda/aquadoggo/pull/170)
- Use UPSERT for inserting or updating documents [#173](https://github.com/p2panda/aquadoggo/pull/173)

## [0.2.0]

*Please note: `aquadoggo-rs` crate is not published yet, due to unpublished dependencies.*
_Please note: `aquadoggo-rs` crate is not published yet, due to unpublished dependencies._

### Changed

Expand Down Expand Up @@ -78,6 +82,6 @@ Released on 2021-10-25: :package: [`crate`](https://crates.io/crates/aquadoggo/0
- Use p2panda-rs 0.2.1 with fixed linter setting [#41](https://github.com/p2panda/aquadoggo/41)
- Use `tide` for HTTP server and `jsonrpc-v2` for JSON RPC [#29](https://github.com/p2panda/aquadoggo/29)

[Unreleased]: https://github.com/p2panda/aquadoggo/compare/v0.2.0...HEAD
[unreleased]: https://github.com/p2panda/aquadoggo/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/p2panda/aquadoggo/releases/tag/v0.2.0
[0.1.0]: https://github.com/p2panda/aquadoggo/releases/tag/v0.1.0
Loading

0 comments on commit 367389b

Please sign in to comment.