From 8d2d0e2f92ef6c474e17aebae0ccf6fb665a48c6 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Tue, 21 May 2024 16:00:10 +0200 Subject: [PATCH] make e2e-tests repo a submodule --- .github/workflows/e2e-tests.yaml | 40 ++++++++++++++++++-------------- .gitmodules | 3 +++ e2e-tests | 1 + 3 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 .gitmodules create mode 160000 e2e-tests diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index 4efba3744a..51aa3bfb8c 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -11,11 +11,20 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: - tests: + e2e-tests: runs-on: ubuntu-latest steps: - name: Checkout the source code uses: actions/checkout@v4 + with: + submodules: true + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: 'yarn' + cache-dependency-path: e2e-tests/yarn.lock - name: Install deps run: sudo apt -y install protobuf-compiler @@ -26,30 +35,25 @@ jobs: - name: Check targets are installed correctly run: rustup target list --installed - - name: Build runtimes + - name: Build Astar & Shiden runtimes run: cargo build --release --features astar,shiden - - name: Clone Astar E2E tests - run: git clone https://github.com/AstarNetwork/e2e-tests.git --depth 1 - - - name: Copy runtimes + - name: Copy runtimes into test folder run: | cp target/release/wbuild/astar-runtime/astar_runtime.compact.compressed.wasm e2e-tests/wasm/astar_runtime.wasm cp target/release/wbuild/shiden-runtime/shiden_runtime.compact.compressed.wasm e2e-tests/wasm/shiden_runtime.wasm - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: 18.x - cache: 'yarn' - cache-dependency-path: e2e-tests/yarn.lock + - name: Install dependencies + working-directory: e2e-tests + run: yarn --immutable - - name: Run e2e test with new runtimes + - name: Update env + working-directory: e2e-tests + run: yarn update-env + + - name: Run e2e test with the new runtimes + working-directory: e2e-tests + run: yarn test env: ASTAR_WASM: wasm/astar_runtime.wasm SHIDEN_WASM: wasm/astar_runtime.wasm - run: | - cd e2e-tests - yarn --immutable - yarn update-env - yarn test diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..777149c2b6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "e2e-tests"] + path = e2e-tests + url = git@github.com:AstarNetwork/e2e-tests.git diff --git a/e2e-tests b/e2e-tests new file mode 160000 index 0000000000..82fc714323 --- /dev/null +++ b/e2e-tests @@ -0,0 +1 @@ +Subproject commit 82fc714323d827e23bc5011ff361e5128f2e52f2