From 0dcd553190b5e62afafab551b086a2f94b53d4d5 Mon Sep 17 00:00:00 2001 From: porink0424 Date: Wed, 17 Apr 2024 16:17:08 +0900 Subject: [PATCH] Add type-check test into github workflow --- .github/workflows/typescript-tests.yml | 23 ++++++++++++++++++++++- optuna_dashboard/package.json | 1 - package.json | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/typescript-tests.yml b/.github/workflows/typescript-tests.yml index c8ade8d7..e00065ed 100644 --- a/.github/workflows/typescript-tests.yml +++ b/.github/workflows/typescript-tests.yml @@ -24,10 +24,31 @@ jobs: with: node-version: '20' - - run: make tslib - run: npm install - run: npm run lint + type-check: + name: Type checking on optuna-dashboard + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@master + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '20' + + - name: Setup tslib + run: make tslib + + - name: Type Check + working-directory: optuna_dashboard + run: | + npm install + npm run type-check + build: name: JS build check runs-on: ubuntu-latest diff --git a/optuna_dashboard/package.json b/optuna_dashboard/package.json index d30b20da..c09e81bd 100644 --- a/optuna_dashboard/package.json +++ b/optuna_dashboard/package.json @@ -6,7 +6,6 @@ "main": "index.js", "scripts": { "watch": "NODE_ENV=development TYPESCRIPT_LOADER=esbuild-loader webpack --watch", - "lint": "npm run type-check", "build": "webpack", "build:dev": "NODE_ENV=development TYPESCRIPT_LOADER=esbuild-loader webpack", "build:prd": "NODE_ENV=production webpack", diff --git a/package.json b/package.json index 1dda5f50..9e243cb4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "scripts": { "fmt": "biome format --write . && biome check standalone_app vscode tslib --apply", - "lint": "npm run lint:eslint && npm run lint:biome && cd optuna_dashboard && npm run lint", + "lint": "npm run lint:eslint && npm run lint:biome", "lint:eslint": "eslint . --ext .ts,.tsx --max-warnings 0", "lint:biome": "biome format . && biome ci standalone_app vscode tslib" },