mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-03 13:43:06 +08:00
feat(TypeScript): Add the workflow file for CI check (#1280)
* feat(TypeScript): Add the workflow file for CI check * fix: Install TypeScript Execute (tsx) * test: Test failed * test: Test successful * test: on windows * Add a bug * feat: type checking * test: Test successful * feat: add main * fix: use process * feat: use es-main * Test failure * feat: streamlined configuration * Apply suggestions from code review Co-authored-by: Yudong Jin <krahets@163.com> * feat: remove lock file * Test failure * Test success --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
26
.github/workflows/typescript.yml
vendored
Normal file
26
.github/workflows/typescript.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: TypeScript
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
paths: ['codes/typescript/**/*.ts']
|
||||
pull_request:
|
||||
branches: ['main']
|
||||
paths: ['codes/typescript/**/*.ts']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Install dependencies
|
||||
run: cd codes/typescript && npm install
|
||||
- name: Check TypeScript code
|
||||
run: cd codes/typescript && npm run check
|
||||
Reference in New Issue
Block a user