Skip to content

Commit

Permalink
Add CLI smoke test CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pawurb committed Oct 25, 2024
1 parent 24917ff commit 1fc5c5e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cargo run --bin pgextras
exit_code=$?
if [ $exit_code -eq 2 ]; then
echo "Command completed successfully."
else
echo "Command failed."
exit 1
fi

0 comments on commit 1fc5c5e

Please sign in to comment.