From 0a3781031331450984adb1fb36f3fb1085e58be6 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Fri, 31 May 2024 18:59:07 +0530 Subject: [PATCH] add e2e tests for interchainjs and networks cosmos --- .github/workflows/e2e-tests.yaml | 71 ++++++++++++++++++++++++++++++++ networks/cosmos/package.json | 2 + 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/e2e-tests.yaml diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml new file mode 100644 index 00000000..b3f1ce4e --- /dev/null +++ b/.github/workflows/e2e-tests.yaml @@ -0,0 +1,71 @@ +name: Run E2E Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + interchainjs: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository 📝 + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'yarn' + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Build Project + run: yarn build + + - name: Set Up Starship Infrastructure + id: starship-infra + uses: cosmology-tech/starship-action@0.2.19 + with: + values: libs/interchainjs/starship/configs/config.workflow.yaml + port-forward: true + version: 0.1.38 + + - name: Run E2E Tests + run: cd ./libs/interchainjs && yarn starship:test + + networks-cosmos: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository 📝 + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'yarn' + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Build Project + run: yarn build + + - name: Set Up Starship Infrastructure + id: starship-infra + uses: cosmology-tech/starship-action@0.2.19 + with: + values: networks/cosmos/starship/configs/config.workflow.yaml + port-forward: true + version: 0.1.38 + + - name: Run E2E Tests + run: cd ./networks/cosmos && yarn starship:test diff --git a/networks/cosmos/package.json b/networks/cosmos/package.json index d2f52c3d..a34c1630 100644 --- a/networks/cosmos/package.json +++ b/networks/cosmos/package.json @@ -27,6 +27,8 @@ "starship:test": "jest --config ./jest.starship.config.js --verbose --bail", "starship:debug": "jest --config ./jest.starship.config.js --runInBand --verbose --bail", "starship:watch": "jest --watch --config ./jest.starship.config.js", + "starship:all": "yarn starship setup && sleep 10 && yarn starship deploy && yarn starship wait-for-pods && yarn starship get-pods && yarn starship start-ports && yarn starship port-pids", + "starship:clean": "yarn starship clean", "prepare": "npm run build" }, "dependencies": {