Skip to content

Commit

Permalink
Merge branch 'main' into schema-provider
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)
  • Loading branch information
adzialocha committed Jun 27, 2022
2 parents de96ba3 + a1e5973 commit b6ec8d6
Show file tree
Hide file tree
Showing 29 changed files with 2,874 additions and 2,369 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
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ 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)
- Add schema task and schema provider that update when new schema views are materialised [#166](https://github.com/p2panda/aquadoggo/pull/166/files)

Expand All @@ -44,10 +45,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 @@ -80,6 +83,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 b6ec8d6

Please sign in to comment.