Skip to content

Commit

Permalink
smoke_test
Browse files Browse the repository at this point in the history
  • Loading branch information
epompeii committed Sep 23, 2023
1 parent d9ae7bd commit fed821c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/bencher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@ jobs:
name: perf.jpeg
path: ./lib/bencher_plot/perf.jpeg

# API Smoke Test
api_smoke_test:
name: API Smoke Test
runs-on: ubuntu-latest
needs:
- cargo_fmt
- cargo_clippy
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1
with:
mold-version: ${{ env.MOLD_VERSION }}
- name: Run API Smoke Test
run: ./scripts/smoke_test.sh

# Cargo Check (Minus)
cargo_check_api_minus:
name: Cargo Check API (Minus)
Expand Down
2 changes: 1 addition & 1 deletion scripts/seed.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

RUST_BACKTRACE=1 cargo test --features seed --test seed -- --nocapture
RUST_BACKTRACE=full cargo test --features seed --test seed -- --nocapture

source ../../scripts/mock.sh
16 changes: 16 additions & 0 deletions scripts/smoke_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

cd ./services/api
cargo run &

cd ../cli
echo "Waiting for API server"
while ! nc -z localhost 61016; do
sleep 1
done

RUST_BACKTRACE=full cargo test --features seed --test seed -- --nocapture

cargo install --path . --locked

source ../../scripts/mock.sh

0 comments on commit fed821c

Please sign in to comment.