From c4feef966d821654185efc9799a198de2410b313 Mon Sep 17 00:00:00 2001 From: Denis Nebytov Date: Sun, 23 Jun 2024 13:03:18 +0300 Subject: [PATCH] a new approach --- .github/workflows/e2e-test-build.yml | 43 ++++++++++++++++++++++++++++ .github/workflows/e2e-tests-ext.yml | 39 +++---------------------- 2 files changed, 47 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/e2e-test-build.yml diff --git a/.github/workflows/e2e-test-build.yml b/.github/workflows/e2e-test-build.yml new file mode 100644 index 0000000000..c794a64a34 --- /dev/null +++ b/.github/workflows/e2e-test-build.yml @@ -0,0 +1,43 @@ +name: E2E Test Build + +on: + workflow_dispatch: + pull_request: + types: [opened, ready_for_review] + pull_request_review: + types: [submitted] + +jobs: + Build-Extension: + if: github.event.review && (github.event.review.state == 'approved' || contains(github.event.review.body, '/check') || contains(github.event.review.body, '/ext-general') || contains(github.event.review.body, '/ext-failing')) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Read .nvmrc + id: nvm + run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: "${{ steps.nvm.outputs.NVMRC }}" + + - name: npm install + run: | + . install-all.sh + + - name: Build the test mainnet version + working-directory: ./packages/yoroi-extension + run: npm run test:build:mainnet + + - name: Archive built app + uses: actions/upload-artifact@v4 + with: + name: builtApp + path: | + ./packages/yoroi-extension/Yoroi-test.crx + ./packages/yoroi-extension/Yoroi.xpi + retention-days: 1 + overwrite: true diff --git a/.github/workflows/e2e-tests-ext.yml b/.github/workflows/e2e-tests-ext.yml index 7930703a4e..c0dbd54d62 100644 --- a/.github/workflows/e2e-tests-ext.yml +++ b/.github/workflows/e2e-tests-ext.yml @@ -6,46 +6,15 @@ on: types: [opened, ready_for_review] pull_request_review: types: [submitted] + workflow_run: + workflows: [E2E Test Build] + types: + - completed jobs: - Build-Extension: - if: github.event.review && (github.event.review.state == 'approved' || contains(github.event.review.body, '/check') || contains(github.event.review.body, '/ext-general') || contains(github.event.review.body, '/ext-failing')) - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Read .nvmrc - id: nvm - run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT - - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: "${{ steps.nvm.outputs.NVMRC }}" - - - name: npm install - run: | - . install-all.sh - - - name: Build the test mainnet version - working-directory: ./packages/yoroi-extension - run: npm run test:build:mainnet - - - name: Archive built app - uses: actions/upload-artifact@v4 - with: - name: builtApp - path: | - ./packages/yoroi-extension/Yoroi-test.crx - ./packages/yoroi-extension/Yoroi.xpi - retention-days: 1 - overwrite: true - Ext-General: if: github.event.review && (github.event.review.state == 'approved' || contains(github.event.review.body, '/check') || contains(github.event.review.body, '/ext-general')) runs-on: macos-latest - needs: Build-Extension strategy: matrix: browser: ["chrome"]