diff --git a/.github/workflows/test-design-system-reusable.yml b/.github/workflows/test-design-system-reusable.yml index 793cde1ef176..60ece428cd09 100644 --- a/.github/workflows/test-design-system-reusable.yml +++ b/.github/workflows/test-design-system-reusable.yml @@ -43,10 +43,11 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ inputs.ref || github.sha }} - - name: Setup the toolchain - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop - id: toolchain + - name: Setup the caches + uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop + id: setup-caches with: + install-proto: true skip-turbo-cache: "false" accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }} roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }} @@ -56,7 +57,7 @@ jobs: run: pnpm i --filter="./libs/ui/**" - name: Build and Test affected libraries id: test-ui - run: pnpm run test --continue --filter="./libs/ui/**" --filter="!./apps/ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" + run: pnpm run test --continue --filter="./libs/ui/**" --filter="!./apps/ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" shell: bash - name: (On Failure) Upload react-ui test results uses: actions/upload-artifact@v4 diff --git a/.github/workflows/test-libs-reusable.yml b/.github/workflows/test-libs-reusable.yml index e9787bdb296c..ff42e106611a 100644 --- a/.github/workflows/test-libs-reusable.yml +++ b/.github/workflows/test-libs-reusable.yml @@ -34,7 +34,7 @@ jobs: ref: ${{ inputs.ref || github.sha }} - name: Setup the caches uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop - id: cache + id: setup-caches with: skip-turbo-cache: "false" accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }} @@ -45,7 +45,7 @@ jobs: run: pnpm i --filter="!./apps/**" - name: Build and Test affected libraries id: test-libs - run: pnpm run test --continue --filter="!./apps/**" --filter="!./libs/ui/**" --filter="!./tools/**" --filter="!./apps/ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.cache.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" + run: pnpm run test --continue --filter="!./apps/**" --filter="!./libs/ui/**" --filter="!./tools/**" --filter="!./apps/ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" shell: bash - name: (On Failure) Upload live-common snapshots and source uses: actions/upload-artifact@v4 @@ -79,26 +79,27 @@ jobs: with: ref: ${{ inputs.ref || github.sha }} fetch-depth: 2 - - name: Setup the toolchain - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop - id: toolchain + - name: Setup the caches + uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop + id: setup-caches 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 }} - skip-turbo-cache: "false" - name: Install dependencies run: pnpm i --filter="!./apps/**" - name: Lint affected libraries id: lint-libs - run: pnpm lint --continue --filter="!./apps/**" --filter="!./tools/**" --filter="!ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" -- --quiet + run: pnpm lint --continue --filter="!./apps/**" --filter="!./tools/**" --filter="!ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" -- --quiet - name: Typecheck affected libraries id: typecheck-libs - run: pnpm typecheck --continue --filter="!./apps/**" --filter="!./tools/**" --filter="!ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" + run: pnpm typecheck --continue --filter="!./apps/**" --filter="!./tools/**" --filter="!ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" - name: Test unimported files id: unimported - run: pnpm unimported --continue --filter="!./apps/**" --filter="!./tools/**" --filter="!ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" + run: pnpm unimported --continue --filter="!./apps/**" --filter="!./tools/**" --filter="!ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" shell: bash - uses: actions/github-script@v6 if: ${{ !cancelled() }} @@ -124,19 +125,20 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ inputs.ref || github.sha }} - - name: Setup the toolchain - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop - id: toolchain + - name: Setup the caches + uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop + id: setup-caches 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 }} - skip-turbo-cache: "false" - name: Install dependencies run: pnpm i --filter="!./apps/**" - name: run doc - run: pnpm doc:ljs --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" + run: pnpm doc:ljs --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" - name: get diff id: diff run: | diff --git a/.github/workflows/test-web-tools-reusable.yml b/.github/workflows/test-web-tools-reusable.yml index a092952082f2..d2b8b604017d 100644 --- a/.github/workflows/test-web-tools-reusable.yml +++ b/.github/workflows/test-web-tools-reusable.yml @@ -26,10 +26,11 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ inputs.ref || github.sha }} - - name: Setup the toolchain - uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop - id: toolchain + - name: Setup the caches + uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop + id: setup-caches with: + install-proto: true skip-turbo-cache: "false" accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }} roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }} @@ -38,7 +39,7 @@ jobs: - name: Install dependencies run: pnpm i -F "web-tools..." -F "ledger-live" - name: build web-tools - run: pnpm turbo run build --filter="@ledgerhq/web-tools" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" + run: pnpm turbo run build --filter="@ledgerhq/web-tools" --api="http://127.0.0.1:${{ steps.setup-caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" report: needs: test-web-tools