Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 58 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
matrix:
os: [ubuntu-latest]
rust: [stable, beta]
postgres: ['14', '15', '16', '17', '18']

services:
postgres:
image: postgres:15-alpine
image: postgres:${{ matrix.postgres }}-alpine
env:
POSTGRES_PASSWORD: test.123
POSTGRES_USER: postgres
Expand Down Expand Up @@ -123,4 +124,59 @@ jobs:
- name: Check for broken intra-doc links
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings"

coverage:
name: Code Coverage
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: test.123
POSTGRES_USER: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libpq-dev pkg-config libssl-dev

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-coverage-

- name: Generate coverage report
run: cargo llvm-cov --lib --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ tokio = { version = "1.49.0", features = ["io-util", "net", "time", "macros"] }
tokio-util = { version = "0.7.18", features = ["compat"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
chrono = { version = "0.4.42", features = ["serde"] }
bytes = "1.11.0"
chrono = { version = "0.4.43", features = ["serde"] }
bytes = "1.11.1"
tracing = "0.1.44"
libpq-sys = "0.8"
thiserror = "2.0.17"
thiserror = "2.0.18"

[features]
default = []
Expand All @@ -31,4 +31,4 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tokio = { version = "1.47.2", features = ["full"] }
futures = "0.3.31"
tokio-stream = { version = "0.1.18", features = ["time"] }
flate2 = "1.1.8"
flate2 = "1.1.9"