Skip to content

Commit

Permalink
Merge branch 'main' into feat/enhanced-dapp-tx-representation
Browse files Browse the repository at this point in the history
  • Loading branch information
mchappell committed Jul 17, 2024
2 parents c41e3bd + 2158475 commit 08f39b5
Show file tree
Hide file tree
Showing 160 changed files with 5,231 additions and 1,456 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.

42 changes: 17 additions & 25 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,26 @@ 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: Check if build exists already then download it
shell: bash
id: download-build-if-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)
if [ "$ART_ID" != "null" ]; then
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"
else
echo "No build artifact found"
fi
- name: Build dist version of Lace
uses: ./.github/shared/build
with:
LACE_EXTENSION_KEY: ${{ inputs.LACE_EXTENSION_KEY }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Decrypt test data
if: success()
working-directory: ./packages/e2e-tests
Expand All @@ -77,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.

22 changes: 20 additions & 2 deletions .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,22 @@ 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 -H "Authorization: Bearer ${{ inputs.GITHUB_TOKEN }}" https://api.github.com/repos/input-output-hk/lace/actions/artifacts?name=lace-build-${{ github.sha }} | jq -r .artifacts[0].id)
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 +82,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 @@ -84,8 +101,9 @@ runs:
BANXA_LACE_URL: ${{ inputs.BANXA_LACE_URL }}
run: yarn browser build
- name: Upload artifact
if: success()
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
overwrite: true
Loading

0 comments on commit 08f39b5

Please sign in to comment.