Skip to content

Commit

Permalink
build: test-libraries, test-web-tools, test-design-system - toolchain…
Browse files Browse the repository at this point in the history
… => cache
  • Loading branch information
angusbayley committed Nov 25, 2024
1 parent b20051d commit 24fe3e7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test-design-system-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/test-libs-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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() }}
Expand All @@ -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: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-web-tools-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down

0 comments on commit 24fe3e7

Please sign in to comment.