Skip to content

CI

CI #1

Workflow file for this run

# 代码检查
name: CI
# 触发条件
on:
# 提PR到next分支触发CI
# pull_request:
# branches:
# - next
# push:
# branches:
# - next
# 手动触发部署
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
# 本地构建
Base-Build:
name: 基础编译构建
runs-on: ubuntu-latest
if: github.repository == '142vip/142vip-oauth' && github.event_name == 'pull_request'
permissions:
actions: read
pull-requests: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.TOKEN }}
persist-credentials: false
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
# 安装PNPM
- name: PNPM Install
uses: pnpm/action-setup@v2
with:
version: 7.33.2
# 安装Node环境
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
# 淘宝镜像加速
registry-url: 'https://registry.npmmirror.com'
# 缓存
cache: pnpm
# 下载依赖,并执行初始化脚本:钩子函数、思维导图构建
- name: Install Dependencies
run: |
./scripts/ci
# todo lint校验待优化
# - name: Code LintFix
# run: |
# ./scripts/lint
- name: Build Midway Example Code
run: |
./scripts/build xxx