Skip to content

feat: scrolls page to top on sidebar Home click #12300

feat: scrolls page to top on sidebar Home click

feat: scrolls page to top on sidebar Home click #12300

name: "[Coin] - Test Coin modules - Scheduled"
on:
schedule:
- cron: "20 9 * * *"
pull_request:
branches-ignore:
- "smartling-content-updated**"
- "smartling-translation-completed**"
workflow_dispatch:
inputs:
ref:
description: "Which ref (branch or tag) to pull from?"
required: false
default: develop
permissions:
id-token: write
contents: read
jobs:
is-affected:
outputs:
is-affected: ${{ steps.set-affected.outputs.is-affected }}
paths: ${{ steps.affected.outputs.paths }}
coins: ${{ steps.affected.outputs.coins }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: develop
fetch-depth: 0
- name: checkout branch (PR)
if: ${{ github.event_name == 'pull_request' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr checkout ${{ github.event.pull_request.number }}
- name: checkout branch (not PR)
if: ${{ github.event_name != 'pull_request' }}
run: |
git checkout $GITHUB_SHA
- uses: LedgerHQ/ledger-live/tools/actions/live-common-affected@develop
id: affected
with:
ref: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.event.pull_request.base.ref) || 'HEAD^' }}
- name: Force affected on schedule
id: set-affected
run: |
if [ "${{ github.event_name }}" = "schedule" ]; then
echo "Forcing affected=true (scheduled run)"
echo "is-affected=true" >> "$GITHUB_OUTPUT"
else
echo "is-affected=${{ steps.affected.outputs.is-affected }}" >> "$GITHUB_OUTPUT"
fi
integ-tests:
name: "Coin modules integration tests"
needs: is-affected
if: ${{ needs.is-affected.outputs.is-affected == 'true' }}
runs-on: ubuntu-22.04
env:
NODE_OPTIONS: "--max-old-space-size=7168"
FORCE_COLOR: 3
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ inputs.ref || github.sha }}
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
with:
install-proto: true
skip-turbo-cache: "false"
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 dependencies
run: pnpm i --filter="!./apps/**"
- name: Build
run: pnpm build:coin-modules:deps
- name: Test (PR)
if: ${{ github.event_name == 'pull_request' }}
shell: bash
env:
FILTER: ${{ needs.is-affected.outputs.coins }}
VERBOSE_FILE: logs.txt
run: |
if [ -z "$FILTER" ]; then
echo "No coin module affected"
else
cmd="pnpm --no-bail"
for coin in $FILTER; do
cmd="$cmd --filter=@ledgerhq/coin-$coin"
done
cmd="$cmd test-integ"
$cmd
fi
- name: Test (Scheduled)
if: ${{ github.event_name == 'schedule' }}
shell: bash
env:
VERBOSE_FILE: logs.txt
run: pnpm coin-modules:test-integ
integ-tests-fail:
name: failure report
needs: integ-tests
if: failure() && (github.event_name == 'schedule' || (github.event_name == 'push' && github.ref_name == 'develop'))
runs-on: ubuntu-latest
steps:
- name: post to live-repo-health slack channel
uses: slackapi/slack-github-action@v2.0.0
with:
token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
method: chat.postMessage
payload: |
channel: "C05FKJ7DFAP"
text: "[Test] Coin modules"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: "❌ *Coin modules integration tests failed*"
- type: "section"
text:
type: "mrkdwn"
text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow run>"
- name: post to coin-integration-private slack channel
uses: slackapi/slack-github-action@v2.0.0
with:
token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
method: chat.postMessage
payload: |
channel: "C06RTDKT324"
text: "[Test] Coin modules"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: "❌ *Coin modules integration tests failed*"
- type: "section"
text:
type: "mrkdwn"
text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow run>"
integ-tests-success:
name: success report
needs: integ-tests
if: success() && github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- name: post to live-repo-health slack channel
uses: slackapi/slack-github-action@v2.0.0
with:
token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
method: chat.postMessage
payload: |
channel: "C05FKJ7DFAP"
text: "[Test] Coin modules"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: "✅️ *Coin modules integration tests success*"
- type: "section"
text:
type: "mrkdwn"
text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow run>"