From 6ffbc81778a5d76b3e65b9331b5a35f25b1dca30 Mon Sep 17 00:00:00 2001 From: "Tyler.S" Date: Mon, 5 Feb 2024 15:49:42 -0800 Subject: [PATCH 1/3] Add workflow for running System Tests nightly --- .github/workflows/nightly-system-tests.yml | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 .github/workflows/nightly-system-tests.yml diff --git a/.github/workflows/nightly-system-tests.yml b/.github/workflows/nightly-system-tests.yml new file mode 100644 index 000000000..7fb20e88f --- /dev/null +++ b/.github/workflows/nightly-system-tests.yml @@ -0,0 +1,114 @@ +name: Soroban Nightly System Tests + +on: + schedule: + # Run every day M-F at 12:30am PST (08:30am UTC) + - cron: '30 8 * * 1,2,3,4,5' + pull_request: + +jobs: + integration: + name: System Tests (Nightly) + strategy: + matrix: + scenario-filter: ["^TestDappDevelop$/^.*$"] + runs-on: ubuntu-latest-4-cores + env: + # the gh tag of system-test repo version to run + SYSTEM_TEST_GIT_REF: master + + # the soroban CLI & RPC source code to compile and run from system test + # refers to checked out source of current git hub ref context + SYSTEM_TEST_SOROBAN_CLI_REF: ${{ github.workspace }}/soroban-tools + SYSTEM_TEST_SOROBAN_RPC_REF: https://github.com/stellar/soroban-rpc.git\#main + + # core git ref should be latest commit for stable soroban functionality + # the core bin can either be compiled in-line here as part of ci, + SYSTEM_TEST_CORE_GIT_REF: https://github.com/stellar/stellar-core.git#v20.1.0 + SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS: "--disable-tests" + # or set SYSTEM_TEST_CORE_GIT_REF to empty, and set SYSTEM_TEST_CORE_IMAGE + # to pull a pre-compiled image from dockerhub instead + SYSTEM_TEST_CORE_IMAGE: + + # sets the version of rust toolchain that will be pre-installed in the + # test runtime environment, tests invoke rustc/cargo + SYSTEM_TEST_RUST_TOOLCHAIN_VERSION: stable + + # set the version of js-stellar-sdk to use, need to choose one of either + # resolution options, using npm release or a gh ref: + # + # option #1, set the version of stellar-sdk based on a npm release version + SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION: 11.1.0 + # option #2, set the version of stellar-sdk used as a ref to a gh repo if + # a value is set on SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO, it takes + # precedence over any SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION + SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO: + SYSTEM_TEST_JS_STELLAR_SDK_GH_REF: + + # the version of rs-stellar-xdr to use for quickstart + SYSTEM_TEST_RS_XDR_GIT_REF: v20.0.2 + + # system test will build quickstart image internally to use for running the service stack + # configured in standalone network mode(core, rpc) + SYSTEM_TEST_QUICKSTART_GIT_REF: https://github.com/stellar/quickstart.git#412bb828ddb4a93745227ab5ad97c623d43f3a5f + + # triggers system test to log out details from quickstart's logs and test steps + SYSTEM_TEST_VERBOSE_OUTPUT: "true" + + # the soroban test cases will compile various contracts from the examples repo + SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_HASH: "v20.0.0" + SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_REPO: "https://github.com/stellar/soroban-examples.git" + steps: + - uses: actions/checkout@v3 + name: checkout system-test + with: + repository: stellar/system-test + ref: ${{ env.SYSTEM_TEST_GIT_REF }} + path: system-test + - uses: actions/checkout@v3 + name: checkout soroban-tools + with: + repository: stellar/soroban-tools + path: soroban-tools + - uses: actions/checkout@v3 + name: checkout soroban-rpc + with: + repository: stellar/soroban-rpc + path: soroban-rpc + - if: ${{ env.SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO != ''}} + name: prepare local js-stellar-sdk + run: | + rm -rf $GITHUB_WORKSPACE/system-test/js-stellar-sdk; + - if: ${{ env.SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO != ''}} + uses: actions/checkout@v3 + with: + repository: ${{ env.SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO }} + ref: ${{ env.SYSTEM_TEST_JS_STELLAR_SDK_GH_REF }} + path: system-test/js-stellar-sdk + - uses: stellar/actions/rust-cache@main + - name: Build system test with component versions + run: | + cd $GITHUB_WORKSPACE/system-test + if [ -z "$SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO" ]; then \ + JS_STELLAR_SDK_REF="$SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION"; \ + else \ + JS_STELLAR_SDK_REF="file:/home/tester/js-stellar-sdk"; \ + fi + make \ + CORE_GIT_REF=$SYSTEM_TEST_CORE_GIT_REF \ + CORE_COMPILE_CONFIGURE_FLAGS="$SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS" \ + CORE_IMAGE=$SYSTEM_TEST_CORE_IMAGE \ + SOROBAN_RPC_GIT_REF=$SYSTEM_TEST_SOROBAN_RPC_REF \ + SOROBAN_CLI_GIT_REF=$SYSTEM_TEST_SOROBAN_CLI_REF \ + RUST_TOOLCHAIN_VERSION=$SYSTEM_TEST_RUST_TOOLCHAIN_VERSION \ + RS_XDR_GIT_REF=$SYSTEM_TEST_RS_XDR_GIT_REF \ + QUICKSTART_GIT_REF=$SYSTEM_TEST_QUICKSTART_GIT_REF \ + JS_STELLAR_SDK_NPM_VERSION=$JS_STELLAR_SDK_REF \ + build + - name: Run system test scenarios + run: | + docker run --rm -t --name e2e_test stellar/system-test:dev \ + --VerboseOutput $SYSTEM_TEST_VERBOSE_OUTPUT \ + --TestFilter "${{ matrix.scenario-filter }}" \ + --SorobanExamplesGitHash $SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_HASH \ + --SorobanExamplesRepoURL $SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_REPO From 5b67af9cdbe16731f96eaf7a08e63e45dfc6b7f7 Mon Sep 17 00:00:00 2001 From: "Tyler.S" Date: Mon, 5 Feb 2024 16:29:24 -0800 Subject: [PATCH 2/3] Use GH repo for checking out RPC and CLI --- .github/workflows/nightly-system-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-system-tests.yml b/.github/workflows/nightly-system-tests.yml index 7fb20e88f..571dba535 100644 --- a/.github/workflows/nightly-system-tests.yml +++ b/.github/workflows/nightly-system-tests.yml @@ -8,7 +8,7 @@ on: jobs: integration: - name: System Tests (Nightly) + name: System tests strategy: matrix: scenario-filter: ["^TestDappDevelop$/^.*$"] @@ -19,7 +19,7 @@ jobs: # the soroban CLI & RPC source code to compile and run from system test # refers to checked out source of current git hub ref context - SYSTEM_TEST_SOROBAN_CLI_REF: ${{ github.workspace }}/soroban-tools + SYSTEM_TEST_SOROBAN_CLI_REF: https://github.com/stellar/soroban-tools.git\#main SYSTEM_TEST_SOROBAN_RPC_REF: https://github.com/stellar/soroban-rpc.git\#main # core git ref should be latest commit for stable soroban functionality From 3dc06e3539f1025d3e0cbd9fa18f8859c1ac5e8c Mon Sep 17 00:00:00 2001 From: "Tyler.S" Date: Tue, 6 Feb 2024 09:16:41 -0800 Subject: [PATCH 3/3] Revert to base e2e config --- .github/workflows/nightly-system-tests.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/nightly-system-tests.yml b/.github/workflows/nightly-system-tests.yml index 571dba535..c7b9c9d4b 100644 --- a/.github/workflows/nightly-system-tests.yml +++ b/.github/workflows/nightly-system-tests.yml @@ -19,8 +19,7 @@ jobs: # the soroban CLI & RPC source code to compile and run from system test # refers to checked out source of current git hub ref context - SYSTEM_TEST_SOROBAN_CLI_REF: https://github.com/stellar/soroban-tools.git\#main - SYSTEM_TEST_SOROBAN_RPC_REF: https://github.com/stellar/soroban-rpc.git\#main + SYSTEM_TEST_SOROBAN_TOOLS_REF: ${{ github.workspace }}/soroban-tools # core git ref should be latest commit for stable soroban functionality # the core bin can either be compiled in-line here as part of ci, @@ -68,13 +67,7 @@ jobs: - uses: actions/checkout@v3 name: checkout soroban-tools with: - repository: stellar/soroban-tools path: soroban-tools - - uses: actions/checkout@v3 - name: checkout soroban-rpc - with: - repository: stellar/soroban-rpc - path: soroban-rpc - if: ${{ env.SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO != ''}} name: prepare local js-stellar-sdk run: | @@ -98,8 +91,8 @@ jobs: CORE_GIT_REF=$SYSTEM_TEST_CORE_GIT_REF \ CORE_COMPILE_CONFIGURE_FLAGS="$SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS" \ CORE_IMAGE=$SYSTEM_TEST_CORE_IMAGE \ - SOROBAN_RPC_GIT_REF=$SYSTEM_TEST_SOROBAN_RPC_REF \ - SOROBAN_CLI_GIT_REF=$SYSTEM_TEST_SOROBAN_CLI_REF \ + SOROBAN_RPC_GIT_REF=$SYSTEM_TEST_SOROBAN_TOOLS_REF \ + SOROBAN_CLI_GIT_REF=$SYSTEM_TEST_SOROBAN_TOOLS_REF \ RUST_TOOLCHAIN_VERSION=$SYSTEM_TEST_RUST_TOOLCHAIN_VERSION \ RS_XDR_GIT_REF=$SYSTEM_TEST_RS_XDR_GIT_REF \ QUICKSTART_GIT_REF=$SYSTEM_TEST_QUICKSTART_GIT_REF \