From f6fae6b896c3cd8626accfc0492fe16f9476a8a2 Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Fri, 22 Mar 2024 15:44:06 -0400 Subject: [PATCH 1/5] move test ci --- .github/workflows/move_test.yml | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/move_test.yml diff --git a/.github/workflows/move_test.yml b/.github/workflows/move_test.yml new file mode 100644 index 00000000..3c91c5fb --- /dev/null +++ b/.github/workflows/move_test.yml @@ -0,0 +1,53 @@ +name: Move Test CI + +on: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - 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 Sui Move tests in coupons + run: sui move test + working-directory: packages/coupons + + - name: Run Sui Move tests in denylist + run: sui move test + working-directory: packages/denylist + + - name: Run Sui Move tests in discounts + run: sui move test + working-directory: packages/discounts + + - name: Run Sui Move tests in managed_names + run: sui move test + working-directory: packages/managed_names + + - name: Run Sui Move tests in registration + run: sui move test + working-directory: packages/registration + + - name: Run Sui Move tests in renewal + run: sui move test + working-directory: packages/renewal + + - name: Run Sui Move tests in subdomains + run: sui move test + working-directory: packages/subdomains + + - name: Run Sui Move tests in suins + run: sui move test + working-directory: packages/suins \ No newline at end of file From 8812ff854923c72307458c36c739dadacbf917e1 Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Fri, 22 Mar 2024 15:47:14 -0400 Subject: [PATCH 2/5] toml update --- packages/day_one/Move.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/day_one/Move.toml b/packages/day_one/Move.toml index 0757228a..a272faa5 100644 --- a/packages/day_one/Move.toml +++ b/packages/day_one/Move.toml @@ -4,7 +4,7 @@ version = "0.0.1" published-at="0xbf1431324a4a6eadd70e0ac6c5a16f36492f255ed4d011978b2cf34ad738efe6" [dependencies] -Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "2d985a3" } +Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "2d985a3", override=true } suins = { local = "../suins" } From ef73b965d55fc04330b432597fe103ecd12e7207 Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Fri, 22 Mar 2024 15:50:12 -0400 Subject: [PATCH 3/5] toml update --- packages/managed_names/Move.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/managed_names/Move.toml b/packages/managed_names/Move.toml index 937b65cf..ccbef6df 100644 --- a/packages/managed_names/Move.toml +++ b/packages/managed_names/Move.toml @@ -3,7 +3,7 @@ name = "managed_names" version = "0.0.1" [dependencies] -Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" } +Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet", override=true } suins = { local = "../suins" } [addresses] From 30e881b22e6a81a91a500a0473e910ad61c6713d Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Fri, 22 Mar 2024 15:52:50 -0400 Subject: [PATCH 4/5] naming updates --- .github/workflows/move_test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/move_test.yml b/.github/workflows/move_test.yml index 3c91c5fb..8f590a6f 100644 --- a/.github/workflows/move_test.yml +++ b/.github/workflows/move_test.yml @@ -20,34 +20,34 @@ jobs: - name: Install Sui using Homebrew run: brew install sui - - name: Run Sui Move tests in coupons + - name: Run move tests in coupons run: sui move test working-directory: packages/coupons - - name: Run Sui Move tests in denylist + - name: Run move tests in denylist run: sui move test working-directory: packages/denylist - - name: Run Sui Move tests in discounts + - name: Run move tests in discounts run: sui move test working-directory: packages/discounts - - name: Run Sui Move tests in managed_names + - name: Run move tests in managed_names run: sui move test working-directory: packages/managed_names - - name: Run Sui Move tests in registration + - name: Run move tests in registration run: sui move test working-directory: packages/registration - - name: Run Sui Move tests in renewal + - name: Run move tests in renewal run: sui move test working-directory: packages/renewal - - name: Run Sui Move tests in subdomains + - name: Run move tests in subdomains run: sui move test working-directory: packages/subdomains - - name: Run Sui Move tests in suins + - name: Run move tests in suins run: sui move test working-directory: packages/suins \ No newline at end of file From 91b8dfc94beb9130af0c9dcde649c3ab80254b0a Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Sat, 23 Mar 2024 12:44:30 -0400 Subject: [PATCH 5/5] all directories and excluded ones --- .github/workflows/move_test.yml | 41 ++++++++------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/.github/workflows/move_test.yml b/.github/workflows/move_test.yml index 8f590a6f..53858b00 100644 --- a/.github/workflows/move_test.yml +++ b/.github/workflows/move_test.yml @@ -20,34 +20,13 @@ jobs: - name: Install Sui using Homebrew run: brew install sui - - name: Run move tests in coupons - run: sui move test - working-directory: packages/coupons - - - name: Run move tests in denylist - run: sui move test - working-directory: packages/denylist - - - name: Run move tests in discounts - run: sui move test - working-directory: packages/discounts - - - name: Run move tests in managed_names - run: sui move test - working-directory: packages/managed_names - - - name: Run move tests in registration - run: sui move test - working-directory: packages/registration - - - name: Run move tests in renewal - run: sui move test - working-directory: packages/renewal - - - name: Run move tests in subdomains - run: sui move test - working-directory: packages/subdomains - - - name: Run move tests in suins - run: sui move test - working-directory: packages/suins \ No newline at end of file + - name: Run move tests in all package subdirectories, with exclusions + run: | + exclude_dirs=("day_one") # 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