Skip to content

Commit

Permalink
Initial commit with two passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boustrophedon committed Jan 22, 2024
0 parents commit 79bbb46
Show file tree
Hide file tree
Showing 9 changed files with 937 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
317 changes: 317 additions & 0 deletions Cargo.lock

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

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "pgtemp"
version = "0.1.0"
edition = "2021"

[dependencies]
tempfile = "^3"
libc = "^0.2"
url = "^2.5"
tokio = { version = "^1", features = ["rt"] }

[dev-dependencies]
# add extra features for dev dependencies
tokio = { version = "^1", features = ["rt", "fs"] }
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
build:
cargo build --all-features

# Run all tests and examples
test:
cargo test --tests --examples --all-features

# Run all tests with and without all features
test-ci:
cargo test --target=$(TARGET_TRIPLE) --tests --examples --all-features
cargo test --target=$(TARGET_TRIPLE) --tests --examples --no-default-features

# Run cargo fmt
fmt:
cargo fmt

# Run clippy and fmt --check
lint:
cargo clippy --no-deps --all-targets --all-features -- -W clippy::pedantic \
-A clippy::let-unit-value \
-A clippy::wildcard-imports \
-A clippy::module-name-repetitions \
-A clippy::uninlined-format-args
cargo fmt --check

# Generate docs
doc:
RUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps

# Compute test coverage for CI with llvm-cov
coverage-ci:
cargo llvm-cov --tests --examples --all-targets --all-features --workspace --lcov --output-path lcov.info

# Compute test coverage with HTML output
coverage:
cargo llvm-cov --tests --examples --all-targets --all-features --workspace --html
Loading

0 comments on commit 79bbb46

Please sign in to comment.