From af16eaf927ddab44a74368f2b169a77743d6f783 Mon Sep 17 00:00:00 2001 From: "Valentin D. Pinkman" Date: Wed, 14 Feb 2024 16:20:46 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20(pr):=20Update=20PR=20CI=20workf?= =?UTF-8?q?low=20to=20include=20typechecks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pull_request.yml | 35 ++++++++++-------------------- apps/sample/package.json | 3 ++- package.json | 1 + packages/core/package.json | 1 + packages/signer/package.json | 1 + packages/trusted-apps/package.json | 1 + packages/ui/package.json | 1 + turbo.json | 3 +++ 8 files changed, 21 insertions(+), 25 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 0bafccffa..e820c12ca 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,42 +1,29 @@ name: pull_request on: [pull_request] + +env: + FORCE_COLOR: "1" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }} + cancel-in-progress: true + jobs: - lint: + health-check: runs-on: [device-sdk-4xlarge-linux] - env: - CI_JOB_NUMBER: 1 steps: - uses: actions/checkout@v3 - uses: ./actions/setup-toolchain-composite - name: Lint - env: - FORCE_COLOR: "1" run: pnpm lint - prettier: - runs-on: [device-sdk-4xlarge-linux] - env: - CI_JOB_NUMBER: 1 - steps: - - uses: actions/checkout@v3 - - - uses: ./actions/setup-toolchain-composite - - name: Prettier run: pnpm prettier - test: - runs-on: [device-sdk-4xlarge-linux] - env: - CI_JOB_NUMBER: 1 - steps: - - uses: actions/checkout@v3 - - - uses: ./actions/setup-toolchain-composite + - name: Typecheck + run: pnpm typecheck - name: Test - env: - FORCE_COLOR: "1" run: pnpm test diff --git a/apps/sample/package.json b/apps/sample/package.json index 28e02b982..e7698bf93 100644 --- a/apps/sample/package.json +++ b/apps/sample/package.json @@ -9,7 +9,8 @@ "lint": "next lint --max-warnings=0", "lint:fix": "next lint --fix", "prettier": "prettier . --check", - "prettier:fix": "prettier . --write" + "prettier:fix": "prettier . --write", + "typecheck": "tsc --noEmit" }, "dependencies": { "@ledgerhq/device-sdk-core": "workspace:*", diff --git a/package.json b/package.json index e5947b8bf..a590a8167 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "prettier": "turbo run prettier --log-order=grouped", "prettier:fix": "turbo run prettier:fix --log-order=grouped", "test": "turbo run test --log-order=grouped", + "typecheck": "turbo run typecheck --log-order=grouped", "core": "pnpm --filter @ledgerhq/device-sdk-core", "signer": "pnpm --filter @ledgerhq/device-sdk-signer", "trusted-apps": "pnpm --filter @ledgerhq/device-sdk-trusted-apps", diff --git a/packages/core/package.json b/packages/core/package.json index a59aba017..bc30386db 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -17,6 +17,7 @@ "test": "jest src", "test:watch": "pnpm test -- --watch", "test:coverage": "pnpm test -- --coverage", + "typecheck": "tsc --noEmit", "module:create": "pnpm hygen core-module with-prompt" }, "dependencies": { diff --git a/packages/signer/package.json b/packages/signer/package.json index 8c74449ef..608455d76 100644 --- a/packages/signer/package.json +++ b/packages/signer/package.json @@ -14,6 +14,7 @@ "lint:fix": "eslint --cache --fix --ext .ts \"src\"", "prettier": "prettier . --check", "prettier:fix": "prettier . --write", + "typecheck": "tsc --noEmit", "test": "jest --passWithNoTests" }, "dependencies": { diff --git a/packages/trusted-apps/package.json b/packages/trusted-apps/package.json index 171482f20..fe8f771bf 100644 --- a/packages/trusted-apps/package.json +++ b/packages/trusted-apps/package.json @@ -13,6 +13,7 @@ "lint:fix": "eslint --cache --fix --ext .ts \"src\"", "prettier": "prettier . --check", "prettier:fix": "prettier . --write", + "typecheck": "tsc --noEmit", "dev": "tsc --watch", "test": "jest --passWithNoTests" }, diff --git a/packages/ui/package.json b/packages/ui/package.json index 8e08b6295..d79e4d29b 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -14,6 +14,7 @@ "lint:fix": "eslint --cache --fix --ext .ts \"src\"", "prettier": "prettier . --check", "prettier:fix": "prettier . --write", + "typecheck": "tsc --noEmit", "test": "jest --passWithNoTests" }, "dependencies": { diff --git a/turbo.json b/turbo.json index 7f7e55118..8269c3c03 100644 --- a/turbo.json +++ b/turbo.json @@ -27,6 +27,9 @@ "dependsOn": ["build", "lint"], "outputs": [], "inputs": ["src/**/*.ts", "tests/**/*.ts"] + }, + "typecheck": { + "dependsOn": ["build", "^typecheck"] } } }