Skip to content

⬆️ Update dependency antd to v5.23.2 #218

⬆️ Update dependency antd to v5.23.2

⬆️ Update dependency antd to v5.23.2 #218

Workflow file for this run

name: CI
# Event设置为main分支的pull request事件和push事件,
on:
push:
branches: main
pull_request:
branches: main
jobs:
# 只需要定义一个job并命名为CI
CI:
runs-on: ubuntu-latest
steps:
# 拉取项目代码
- name: Checkout repository
uses: actions/checkout@v3
# 使用pnpm
- name: Use pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: 7
# 给当前环境下载node
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: 'pnpm'
# 检查缓存
# 如果key命中缓存则直接将缓存的文件还原到 path 目录,从而减少流水线运行时间
# 若 key 没命中缓存时,在当前Job成功完成时将自动创建一个新缓存
- name: Cache
# 缓存命中结果会存储在steps.[id].outputs.cache-hit里,该变量在继后的step中可读
id: cache-dependencies
uses: actions/cache@v3
with:
# 缓存文件目录的路径
path: |
**/node_modules
# key中定义缓存标志位的生成方式。runner.OS指当前环境的系统。外加对yarn.lock内容生成哈希码作为key值,如果yarn.lock改变则代表依赖有变化。
# 这里用yarn.lock而不是package.json是因为package.json中还有version和description之类的描述项目但和依赖无关的属性
key: ${{runner.OS}}-${{hashFiles('pnpm-lock.yaml')}}
# 安装依赖
- name: Installing Dependencies
# 如果缓存标志位没命中,则执行该step。否则就跳过该step
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: pnpm install
# 运行代码扫描
- name: Running Lint
# 通过package.js定义的命令行执行代码扫描
run: pnpm run lint
# 运行自动化测试
# - name: Running Test
# 通过package.js定义的命令行执行自动化测试
# run: pnpm run test