Fix suibase-daemon restart wrongly reported failing (sometimes) #225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scripts Tests | |
# Controls when the workflow will run | |
on: | |
push: | |
branches: ["dev"] | |
workflow_dispatch: | |
jobs: | |
diff: | |
runs-on: [ubuntu-latest] | |
outputs: | |
isChanged: ${{ steps.diff.outputs.isScript == 'true' || steps.diff.outputs.isRust == 'true' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Detect Changes | |
uses: "./.github/actions/diffs" | |
id: diff | |
test: | |
name: Test ${{ matrix.os }} | |
needs: diff | |
if: ${{ (needs.diff.outputs.isChanged == 'true') || (github.event_name == 'workflow_dispatch') }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
if: runner.os == 'Linux' | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# 'true' means remove... | |
tool-cache: true | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: false # Not sure if needed for heavy link... keep it for now. | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Install Rust Toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
cache: "false" # Control cache in "Rust Caching" step instead. | |
- name: Sui Prerequesites (Ubuntu) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install curl cmake gcc libssl-dev pkg-config libclang-dev libpq-dev build-essential | |
- name: Sui Prerequesites (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install curl cmake | |
- name: Prepare environment | |
run: | | |
mkdir -p $HOME/.local/bin | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
ln -s $GITHUB_WORKSPACE $HOME/suibase | |
- name: Run suibase CLI sanity tests only | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: $HOME/suibase/scripts/tests/run-all.sh --scripts-tests |