Skip to content

添加示例对话系统的基本结构,包括 package.json、index.html、App.tsx、样式文件和对话数据,构建了初步的用户交互界面。 #1

添加示例对话系统的基本结构,包括 package.json、index.html、App.tsx、样式文件和对话数据,构建了初步的用户交互界面。

添加示例对话系统的基本结构,包括 package.json、index.html、App.tsx、样式文件和对话数据,构建了初步的用户交互界面。 #1

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run type check
run: npm run type-check
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test -- --coverage --watchAll=false
- name: Build
run: npm run build
publish:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}