[Test] Integration #570
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "[Test] Integration" | |
on: | |
schedule: | |
- cron: 20 9 * * * | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: "Which ref (branch or tag) to pull from ?" | |
required: false | |
default: develop | |
filter: | |
description: "passed to a jest test name filtering" | |
required: false | |
default: "" | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
integration-tests: | |
name: "Integration Tests" | |
env: | |
NODE_OPTIONS: "--max-old-space-size=7168" | |
FORCE_COLOR: 3 | |
CI_OS: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref || github.sha }} | |
fetch-depth: 0 | |
- name: Setup the toolchain | |
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop | |
id: toolchain | |
with: | |
skip-turbo-cache: "false" | |
upgrade_npm: ${{ matrix.os == 'windows-latest' }} | |
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }} | |
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }} | |
region: ${{ secrets.AWS_CACHE_REGION }} | |
turbo-server-token: ${{ secrets.TURBOREPO_SERVER_TOKEN }} | |
- name: Install node-gyp globally | |
if: runner.os == 'Windows' | |
run: | | |
pnpm add -g node-gyp | |
- name: Install dependencies | |
run: pnpm i --filter="live-common..." --filter="ledger-live" | |
- name: Build | |
run: pnpm build:llc --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" | |
- name: Test | |
shell: bash | |
env: | |
FILTER: ${{ inputs.filter }} | |
VERBOSE_FILE: logs.txt | |
run: | | |
pnpm common ci-test-integration $FILTER | |
git diff --exit-code libs/ledger-live-common/src | |
- name: (On Failure) Upload live-common snapshots and source | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ format('live-common-src-{0}', matrix.os) }} | |
path: | | |
libs/ledger-live-common/src | |
- name: (On Failure) Upload logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: logs.txt | |
path: logs.txt |