From 7e49caa0b741230f333eef2370b52638915bc67b Mon Sep 17 00:00:00 2001 From: pawurb Date: Fri, 25 Oct 2024 13:11:22 +0200 Subject: [PATCH] Add cli smoke test CI --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d64d635..97bf776 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,20 @@ jobs: run: cargo fmt --all --check - name: Lint run: cargo clippy --all --all-features -- -D warnings + - name: Smoke test CLI + env: + DATABASE_URL: postgres://postgres:secret@localhost:5432/pg-extras-rs-test + run: | + cargo run --bin pgextras + exit_code=$? + if [ $exit_code -eq 2 ]; then + echo "Command completed successfully." + else + echo "Command failed." + exit 1 + fi + + cargo run --bin pgextras cache-hit - name: Run tests for PG 12 env: PG_VERSION: 12