From 76b097567ae88394e1b345074db3bedc2895063d Mon Sep 17 00:00:00 2001 From: Matthew Krak Date: Tue, 10 Dec 2024 14:30:25 -0800 Subject: [PATCH] chore: add CI tests for aptos examples --- tests-user/tests/create-lz-oapp.bats | 117 +++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/tests-user/tests/create-lz-oapp.bats b/tests-user/tests/create-lz-oapp.bats index a5ade9c7e..4ac914107 100644 --- a/tests-user/tests/create-lz-oapp.bats +++ b/tests-user/tests/create-lz-oapp.bats @@ -178,6 +178,42 @@ teardown() { pnpm test } +@test "should work with pnpm & oft aptos example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/pnpm-oft-aptos" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-aptos --destination $DESTINATION --package-manager pnpm + cd "$DESTINATION" + pnpm compile + pnpm test +} + +@test "should work with pnpm & oft adapter aptos example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/pnpm-oft-adapter-aptos" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-adapter-aptos --destination $DESTINATION --package-manager pnpm + cd "$DESTINATION" + pnpm compile + pnpm test +} + +@test "should work with pnpm & oft aptos coin example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/pnpm-oft-aptos-coin" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-aptos-coin --destination $DESTINATION --package-manager pnpm + cd "$DESTINATION" + pnpm compile + pnpm test +} + +@test "should work with pnpm & oft adapter aptos coin example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/pnpm-oft-adapter-aptos-coin" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-adapter-aptos-coin --destination $DESTINATION --package-manager pnpm + cd "$DESTINATION" + pnpm compile + pnpm test +} + @test "should work with pnpm & oapp read example in CI mode" { local DESTINATION="$PROJECTS_DIRECTORY/pnpm-oapp-read" @@ -251,6 +287,51 @@ teardown() { yarn test } +@test "should work with yarn & oft aptos example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/yarn-oft-aptos" + + YARN_CACHE_FOLDER="/tmp/.yarn-cache-oft-aptos" LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-aptos --destination $DESTINATION --package-manager yarn + cd "$DESTINATION" + yarn compile + yarn test +} + +@test "should work with yarn & oft adapter aptos example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/yarn-oft-adapter-aptos" + + YARN_CACHE_FOLDER="/tmp/.yarn-cache-oft-adapter-aptos" LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-adapter-aptos --destination $DESTINATION --package-manager yarn + cd "$DESTINATION" + yarn compile + yarn test +} + +@test "should work with yarn & oft aptos coin example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/yarn-oft-adapter-aptos-coin" + + YARN_CACHE_FOLDER="/tmp/.yarn-cache-oft-adapter-aptos-coin" LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-adapter-aptos-coin --destination $DESTINATION --package-manager yarn + cd "$DESTINATION" + yarn compile + yarn test +} + +@test "should work with yarn & oft adapter aptos coin example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/yarn-oft-aptos-coin" + + YARN_CACHE_FOLDER="/tmp/.yarn-cache-oft-aptos-coin" LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-aptos-coin --destination $DESTINATION --package-manager yarn + cd "$DESTINATION" + yarn compile + yarn test +} + +@test "should work with npm & oft adapter aptos coin example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/npm-oft-adapter-aptos" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-adapter-aptos-coin --destination $DESTINATION --package-manager npm + cd "$DESTINATION" + npm run compile + npm run test +} + @test "should work with yarn & oapp read example in CI mode" { local DESTINATION="$PROJECTS_DIRECTORY/yarn-oapp-read" @@ -324,6 +405,42 @@ teardown() { npm run test } +@test "should work with npm & oft aptos example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/npm-oft-aptos" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-aptos --destination $DESTINATION --package-manager npm + cd "$DESTINATION" + npm run compile + npm run test +} + +@test "should work with npm & oft adapter aptos example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/npm-oft-adapter-aptos" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-adapter-aptos --destination $DESTINATION --package-manager npm + cd "$DESTINATION" + npm run compile + npm run test +} + +@test "should work with npm & oft aptos coin example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/npm-oft-aptos-coin" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-aptos-coin --destination $DESTINATION --package-manager npm + cd "$DESTINATION" + npm run compile + npm run test +} + +@test "should work with npm & oft adapter aptos coin example in CI mode" { + local DESTINATION="$PROJECTS_DIRECTORY/npm-oft-adapter-aptos" + + LZ_ENABLE_EXPERIMENTAL_APTOS_EXAMPLES=1 npx --yes create-lz-oapp --ci --example oft-adapter-aptos-coin --destination $DESTINATION --package-manager npm + cd "$DESTINATION" + npm run compile + npm run test +} + @test "should work with npm & oapp read example in CI mode" { local DESTINATION="$PROJECTS_DIRECTORY/npm-oapp-read"