From fed821c02b6be4cd90125b6a22ebbbc5866e502a Mon Sep 17 00:00:00 2001 From: Everett Pompeii Date: Sat, 23 Sep 2023 10:44:19 -0400 Subject: [PATCH] smoke_test --- .github/workflows/bencher.yml | 15 +++++++++++++++ scripts/seed.sh | 2 +- scripts/smoke_test.sh | 16 ++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 scripts/smoke_test.sh diff --git a/.github/workflows/bencher.yml b/.github/workflows/bencher.yml index adb84f280..fca388c11 100644 --- a/.github/workflows/bencher.yml +++ b/.github/workflows/bencher.yml @@ -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) diff --git a/scripts/seed.sh b/scripts/seed.sh index d11675a7b..6db5fec21 100755 --- a/scripts/seed.sh +++ b/scripts/seed.sh @@ -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 diff --git a/scripts/smoke_test.sh b/scripts/smoke_test.sh new file mode 100755 index 000000000..e5b0b148e --- /dev/null +++ b/scripts/smoke_test.sh @@ -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