Skip to content

Copy updates Electron #636

Copy updates Electron

Copy updates Electron #636

name: Integration tests
on:
pull_request:
workflow_dispatch:
inputs:
url:
description: 'API URL to test'
required: true
default: https://stacks-node-api.testnet.stacks.co
jobs:
test-integration:
runs-on: ${{ matrix.os }}
env:
STX_NETWORK: ${{ matrix.stx_network }}
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
DEFAULT_TESTNET_STACKS_NODE_URL: ${{ github.event.inputs.name }}
strategy:
matrix:
os: [macos-11, ubuntu-20.04]
stx_network: [testnet, mainnet]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Add required Linux dependencies
uses: ./.github/actions/linux-deps
if: matrix.os == 'ubuntu-20.04'
- name: Install packages
uses: nick-invision/retry@v2
if: steps.cache-node-modules.outputs.cache-hit != 'true'
with:
timeout_seconds: 600
max_attempts: 5
retry_on: error
command: yarn --frozen-lockfile
- uses: microsoft/playwright-github-action@v1
- name: Install electron-prebuilt
uses: nick-invision/retry@v2
with:
timeout_seconds: 300
max_attempts: 5
retry_on: error
command: yarn add electron-prebuilt --ignore-scripts
- run: ls -R node_modules/electron
- run: cd node_modules/electron && sudo node install.js
- run: ls -R node_modules/electron
- name: Build assets
run: ./node_modules/.bin/cross-env yarn build
env:
NODE_ENV: production
SHA: ${{ github.event.pull_request.head.sha }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- run: yarn test:integration
if: matrix.os == 'macos-11'
- run: xvfb-run --auto-servernum -- yarn test:integration
if: matrix.os == 'ubuntu-20.04'
- uses: actions/upload-artifact@v2
if: always()
with:
name: test-screenshots-${{ matrix.os }}-${{ matrix.stx_network }}-${{ steps.date.outputs.date }}
path: screenshots