added tsconfig to ci

This commit is contained in:
JasonLandbridge
2024-09-03 16:34:27 +02:00
parent af7c47de99
commit 7a5862ba26
4 changed files with 22 additions and 6 deletions

View File

@@ -17,13 +17,12 @@ jobs:
- name: Install Dependencies - name: Install Dependencies
run: bun install run: bun install
- name: OpenAPI Lint
run: bun run lint
- name: Install Speakeasy CLI - name: Install Speakeasy CLI
run: bun run setup-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 - name: Bundle OpenAPI Spec
run: bun run build run: bun run build

View File

@@ -6,7 +6,7 @@ name: Unit Tests
- tests/** - tests/**
jobs: jobs:
test: setup:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout PR branch - name: Checkout PR branch
@@ -18,8 +18,19 @@ jobs:
- name: Install Dependencies - name: Install Dependencies
run: bun install run: bun install
unit-test:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Bundle OpenAPI Spec - name: Bundle OpenAPI Spec
run: bun run build run: bun run build
- name: Run Unit Tests - name: Run Unit Tests
run: bun run test run: bun run test
type-check:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Run Unit Tests
run: bun run type-check

View File

@@ -13,6 +13,7 @@
"build": "swagger-cli bundle --dereference ./src/pms-spec.yaml -t yaml -o ./output/plex-media-server-spec-dereferenced.yaml", "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", "build-redocly": "redocly bundle ./src/pms-spec.yaml --ext yaml -o ./output/plex-media-server-spec-dereferenced.yaml",
"test": "bun run build && vitest --run", "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", "setup-speakeasy-cli": "curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh",
"lint": "redocly lint", "lint": "redocly lint",
"lint-speakeasy": "speakeasy lint openapi -s ./src/pms-spec.yaml", "lint-speakeasy": "speakeasy lint openapi -s ./src/pms-spec.yaml",

View File

@@ -1,7 +1,12 @@
{ {
"compilerOptions": { "compilerOptions": {
"noEmit": true,
"outDir": "./output",
"types": [ "types": [
"@modyfi/vite-plugin-yaml/modules" "@modyfi/vite-plugin-yaml/modules"
], ],
} "skipLibCheck": true
},
"include": ["**/*.ts"],
"exclude": ["node_modules"]
} }