splitgraph / seafowl

Analytical database for data-driven Web applications πŸͺΆ
https://seafowl.io
Apache License 2.0
409 stars 9 forks source link

Experimental: introduce a basic "did it run" test to the GHA #287

Closed onpaws closed 1 year ago

onpaws commented 1 year ago

Goal

Help reduce the risk of building a bad binary

Method

  1. After building the binary we perform a minimally viable invocation (e.g. seafowl --version) using each OS in the matrix. Serves as a basic smoke test to answer the Q "did it run?"
  2. In case of non-zero exit code, pass it into the exit call. I've only observed macOS so far, which today returned 134 for the binary with the SSL issue.

How do we know it works?

Because I don't have a Windows machine immediately available to test on, I can't say for 100% sure. πŸ˜“ My understanding is that because bash is running across all three OSes, we can at least say the bash script ran because act -n on my dev server returned

*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   ☁  git clone 'https://github.com/docker/build-push-action' # ref=v3
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   ☁  git clone 'https://github.com/actions/upload-artifact' # ref=v3
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] πŸ§ͺ  Matrix: map[build:linux os:ubuntu-18.04 target:x86_64-unknown-linux-gnu]
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Install prerequisites
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Install prerequisites
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Checkout the repository
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Checkout the repository
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main rustup toolchain install stable --profile minimal
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main rustup toolchain install stable --profile minimal
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Swatinem/rust-cache@v2
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Swatinem/rust-cache@v2
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Build the release binary
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Build the release binary
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Strip release binary (linux and macos)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Strip release binary (linux and macos)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Test invoking the binaries
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Test invoking the binaries
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Prepare artifact name
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Prepare artifact name
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Login to DockerHub (Linux only)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Login to DockerHub (Linux only)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Determine Docker tags
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Determine Docker tags
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Build and push Docker image (Linux only)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Build and push Docker image (Linux only)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Main Upload binaries as artifacts
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Main Upload binaries as artifacts
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Post Build and push Docker image (Linux only)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Post Build and push Docker image (Linux only)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Post Login to DockerHub (Linux only)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Post Login to DockerHub (Linux only)
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] ⭐ Run Post Swatinem/rust-cache@v2
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1]   βœ…  Success - Post Swatinem/rust-cache@v2
*DRYRUN* [Build nightly binaries and perform releases/Build the binaries-1] 🏁  Job succeeded

And we see success for the new step, "Test invoking the binaries."

Feedback welcome.

mildbyte commented 1 year ago

Thanks!