Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
karliatto committed Apr 18, 2024
1 parent 9d16522 commit 32f2fb7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 16 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/connect-dev-release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
- "packages/transport/**"
- "packages/utxo-lib/**"
- "packages/utils/**"
- "packages/connect-examples/webextension-mv2/**"
- "packages/connect-examples/webextension-mv3/**"
- "submodules/trezor-common/**"
- "yarn.lock"
- ".github/workflows/connect-dev-release-test.yml"
Expand Down Expand Up @@ -116,3 +118,12 @@ jobs:
with:
test-name: unchained.test
DEV_SERVER_HOSTNAME: dev.suite.sldev.cz

webextension-examples:
needs: [build-deploy]
uses: ./.github/workflows/template-connect-popup-test-params.yml
with:
test-name: mv2-webextension.test
DEV_SERVER_HOSTNAME: dev.suite.sldev.cz
run-webextension: true
run-web: false
23 changes: 20 additions & 3 deletions .github/workflows/template-connect-popup-test-params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ on:
description: "Flag to indicate whether to run the webextension job"
type: "boolean"
required: false
default: false
run-web:
description: "Flag to indicate whether to run the web job"
type: "boolean"
required: false
default: true
build-overview:
description: "Flag to indicate whether to build connect-popup-overview.html"
type: "boolean"
required: false
default: false

jobs:
web:
name: web
runs-on: ubuntu-latest
if: ${{ inputs.run-web }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -67,7 +75,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-artifacts-${{ inputs.test-name }}-${{ github.run_attempt }}
name: web-test-artifacts-${{ inputs.test-name }}-${{ github.run_attempt }}-${{ github.run_id }}
path: |
packages/connect-popup/test-results
Expand All @@ -92,14 +100,23 @@ jobs:
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Build webextension
- name: Install dependencies
run: |
yarn install --immutable
yarn build:libs
- name: Build webextension
run: |
yarn workspace @trezor/connect-webextension build
yarn workspace @trezor/connect-iframe build:core-module
yarn workspace @trezor/connect-explorer build:webextension
- name: Build example webextension
run: |
yarn workspace @trezor/connect-web build:webextension
yarn workspace @trezor/connect-web build:inline
node packages/connect-examples/update-webextensions.js
- name: Make Docker Script Executable
run: chmod +x ./docker/docker-connect-popup-ci.sh

Expand All @@ -116,7 +133,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-artifacts-${{ inputs.test-name }}-${{ github.run_attempt }}
name: webextension-test-artifacts-${{ inputs.test-name }}-${{ github.run_attempt }}-${{ github.run_id }}
path: |
packages/connect-popup/test-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test('Basic web extension MV2', async () => {
__dirname,
'..',
'..',
'..',
'connect-examples',
'webextension-mv2',
'build',
Expand Down Expand Up @@ -134,6 +135,7 @@ test('Basic web extension MV3', async () => {
__dirname,
'..',
'..',
'..',
'connect-examples',
'webextension-mv3',
'build',
Expand Down
13 changes: 0 additions & 13 deletions packages/connect-webextension/e2e/playwright.config.ts

This file was deleted.

0 comments on commit 32f2fb7

Please sign in to comment.