Skip to content

重构 Token 计算 #31

重构 Token 计算

重构 Token 计算 #31

Workflow file for this run

name: Admin test
on:
push:
pull_request:
jobs:
eslint:
if: github.repository == 'imiphp/imi-ai'
runs-on: ubuntu-20.04
defaults:
run:
working-directory: admin
steps:
- uses: actions/checkout@v3
- name: Set node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node
restore-keys: ${{ runner.os }}-node
- name: Install
run: npm i
- name: Lint
run: npm run lint
vue-tsc:
if: github.repository == 'imiphp/imi-ai'
runs-on: ubuntu-20.04
defaults:
run:
working-directory: admin
steps:
- uses: actions/checkout@v3
- name: Set node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node
restore-keys: ${{ runner.os }}-node
- name: Install
run: npm i
- name: Typecheck
run: npm run typecheck