Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/lw-10725-add-mor…
Browse files Browse the repository at this point in the history
…e-field-cosigners
  • Loading branch information
szymonmaslowski committed Jul 15, 2024
2 parents accb1e1 + 5796e23 commit 9c34d51
Show file tree
Hide file tree
Showing 136 changed files with 4,633 additions and 1,090 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = {
'@typescript-eslint/no-explicit-any': ['error'],
'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }],
'lodash/import-scope': ['error', 'method'],
'promise/avoid-new': 'off',
'promise/avoid-new': 'off'
},
overrides: [
{
Expand Down
65 changes: 0 additions & 65 deletions .github/actions/build/app/action.yml

This file was deleted.

35 changes: 18 additions & 17 deletions .github/actions/test/e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: e2e-split
description: Execute e2e regression split tests

inputs:
LACE_EXTENSION_KEY:
description: 'Public extended manifest key'
required: true
WALLET_PASSWORD:
description: 'Test wallet password'
required: true
Expand All @@ -23,41 +26,35 @@ inputs:
description: 'Tests batch'
required: true
default: '1'
SMOKE_ONLY:
description: 'Run only smoke tests'
required: true
default: 'false'

runs:
using: 'composite'

steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Node modules cache
uses: actions/cache@v4
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Start XVFB
shell: bash
env:
DISPLAY: ${{ inputs.DISPLAY }}
run: |
Xvfb :99 &
- name: Get built extension
uses: actions/download-artifact@v4
- name: Build dist version of Lace
uses: ./.github/shared/build
with:
name: lace-browser-extension-dist-build
path: ./apps/browser-extension-wallet/dist
LACE_EXTENSION_KEY: ${{ inputs.LACE_EXTENSION_KEY }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Decrypt test data
if: success()
working-directory: ./packages/e2e-tests
run: ./decrypt_secret.sh
shell: bash
env:
WALLET_1_PASSWORD: ${{ inputs.WALLET_PASSWORD }}
- name: Execute E2E tests
if: success()
shell: bash
id: e2e-tests
working-directory: ./packages/e2e-tests
Expand All @@ -68,7 +65,11 @@ runs:
DISPLAY: ${{ inputs.DISPLAY }}
BATCH: ${{ inputs.BATCH }}
run: |
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch${BATCH} --cucumberOpts.tags='@Testnet and not @Pending'"
if [ "${{ inputs.SMOKE_ONLY }}" == "true" ]; then
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch${BATCH} --cucumberOpts.tags='@Smoke and @Testnet and not @Pending'"
else
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch${BATCH} --cucumberOpts.tags='@Testnet and not @Pending'"
fi
eval "$runCommand";
- name: Save dmesg logs
shell: bash
Expand Down
123 changes: 0 additions & 123 deletions .github/actions/test/smoke/action.yml

This file was deleted.

27 changes: 26 additions & 1 deletion .github/shared/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ inputs:
description: 'Banxa`s integration URL'
required: false
default: 'https://lacewallet.banxa-sandbox.com/'

runs:
using: 'composite'
steps:
Expand All @@ -46,7 +47,24 @@ runs:
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Check if build exists already
shell: bash
id: check-build-exists
run: |
ART_ID=$(curl https://api.github.com/repos/input-output-hk/lace/actions/artifacts?name=lace-build-${{ github.sha }} | jq -r .artifacts[0].id)
ART_ID1=$(curl https://api.github.com/repos/input-output-hk/lace/actions/artifacts?name=lace-build-${{ github.sha }})
echo "ART_ID1: $ART_ID1"
if [ "$ART_ID" == "null" ]; then
echo "No Lace build artifact found, will build it now"
echo "build_exists=false" >> $GITHUB_OUTPUT
else
curl -o build_artifact.zip --location "https://api.github.com/repos/input-output-hk/lace/actions/artifacts/${ART_ID}/zip" -H "Authorization: Bearer ${{ inputs.GITHUB_TOKEN }}"
unzip build_artifact.zip -d ./apps/browser-extension-wallet/dist
echo "Build artifact found and downloaded"
echo "build_exists=true" >> $GITHUB_OUTPUT
fi
- name: Configure Yarn to use GitHub Packages
if: steps.check-build-exists.outputs.build_exists == 'false'
run: |
SCOPE="input-output-hk"
FILE="$HOME/.yarnrc.yml"
Expand All @@ -66,12 +84,13 @@ runs:
echo " npmAuthToken: \"${{ inputs.GITHUB_TOKEN }}\"" >> "$FILE"
echo "Added npmScopes and $SCOPE to $FILE"
fi
shell: bash
- name: Install dependencies
if: steps.check-build-exists.outputs.build_exists == 'false'
shell: bash
run: yarn install --immutable --inline-builds
- name: Build dist version
if: steps.check-build-exists.outputs.build_exists == 'false'
shell: bash
env:
NODE_OPTIONS: '--max_old_space_size=8192'
Expand All @@ -83,3 +102,9 @@ runs:
PRODUCTION_MODE_TRACKING: ${{ inputs.PRODUCTION_MODE_TRACKING }}
BANXA_LACE_URL: ${{ inputs.BANXA_LACE_URL }}
run: yarn browser build
- name: Upload artifact
if: steps.check-build-exists.outputs.build_exists == 'false'
uses: actions/upload-artifact@v4
with:
name: lace-build-${{ github.sha }}
path: ./apps/browser-extension-wallet/dist
Loading

0 comments on commit 9c34d51

Please sign in to comment.