From 7a5862ba26d3552e9c896e04551127e55841311f Mon Sep 17 00:00:00 2001 From: JasonLandbridge Date: Tue, 3 Sep 2024 16:34:27 +0200 Subject: [PATCH] added tsconfig to ci --- .github/workflows/openapi-linting.yaml | 7 +++---- .github/workflows/openapi-tests.yaml | 13 ++++++++++++- package.json | 1 + tsconfig.json | 7 ++++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/openapi-linting.yaml b/.github/workflows/openapi-linting.yaml index a8faa8f9..98570cd8 100644 --- a/.github/workflows/openapi-linting.yaml +++ b/.github/workflows/openapi-linting.yaml @@ -17,13 +17,12 @@ jobs: - name: Install Dependencies run: bun install + - name: OpenAPI Lint + run: bun run lint + - name: Install Speakeasy CLI run: bun run setup-speakeasy-cli -# TODO: Disable this step until the linting is fixed in speakeasy with regards to $ref parameters in the OpenAPI spec `GET` must define parameter `ratingKey` as expected by path `/library/metadata/{ratingKey}` -# - name: OpenAPI Lint -# run: bun run lint - - name: Bundle OpenAPI Spec run: bun run build diff --git a/.github/workflows/openapi-tests.yaml b/.github/workflows/openapi-tests.yaml index 34933b94..98b8ac20 100644 --- a/.github/workflows/openapi-tests.yaml +++ b/.github/workflows/openapi-tests.yaml @@ -6,7 +6,7 @@ name: Unit Tests - tests/** jobs: - test: + setup: runs-on: ubuntu-latest steps: - name: Checkout PR branch @@ -18,8 +18,19 @@ jobs: - name: Install Dependencies run: bun install + unit-test: + needs: setup + runs-on: ubuntu-latest + steps: - name: Bundle OpenAPI Spec run: bun run build - name: Run Unit Tests run: bun run test + + type-check: + needs: setup + runs-on: ubuntu-latest + steps: + - name: Run Unit Tests + run: bun run type-check diff --git a/package.json b/package.json index a0003fef..1108ac47 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "build": "swagger-cli bundle --dereference ./src/pms-spec.yaml -t yaml -o ./output/plex-media-server-spec-dereferenced.yaml", "build-redocly": "redocly bundle ./src/pms-spec.yaml --ext yaml -o ./output/plex-media-server-spec-dereferenced.yaml", "test": "bun run build && vitest --run", + "type-check": "tsc", "setup-speakeasy-cli": "curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh", "lint": "redocly lint", "lint-speakeasy": "speakeasy lint openapi -s ./src/pms-spec.yaml", diff --git a/tsconfig.json b/tsconfig.json index 2c4b7abb..355a07b3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,12 @@ { "compilerOptions": { + "noEmit": true, + "outDir": "./output", "types": [ "@modyfi/vite-plugin-yaml/modules" ], - } + "skipLibCheck": true + }, + "include": ["**/*.ts"], + "exclude": ["node_modules"] }