Skip to content

CI changes (more efficient runs) & better usable flows for testing #124

CI changes (more efficient runs) & better usable flows for testing

CI changes (more efficient runs) & better usable flows for testing #124

Workflow file for this run

name: Move Test CI
on:
pull_request:
paths:
- '.github/workflows/**'
- 'packages/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
# Fetches the Sui REPO so we can run the `sui-test-validator`
# TODO: Figure out if there's a better way to do this.
- uses: actions/checkout@v4
with:
repository: 'https://github.com/MystenLabs/sui.git'
path: 'sui'
fetch-depth: 1
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
- name: Install Sui using Homebrew
run: brew install sui
- name: Run move tests in all package subdirectories, with exclusions
run: |
exclude_dirs=(governance) # Add excluded directories to this array
for dir in packages/*; do
dir_name=$(basename "$dir")
if [[ ! " ${exclude_dirs[@]} " =~ " ${dir_name} " ]] && [ -d "$dir" ]; then
echo "Running sui move test in $dir"
(cd "$dir" && sui move test)
fi
done