CI #1065
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# 在master分支发生push事件时触发。 | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: | |
- main | |
- changeset-release/main | |
pull_request: | |
branches: | |
- main | |
jobs: # 工作流 | |
lint: | |
runs-on: ubuntu-latest #运行在虚拟机环境ubuntu-latest | |
steps: | |
- name: checkout code repository # 步骤的名字 切到对应的分支 | |
uses: actions/checkout@v2 # 使用actions/checkout@v2这个action | |
with: # 这个action的参数 | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: ./.github/actions/pnpm | |
with: | |
cache: '.pnpm-store' | |
- name: Run Lint | |
run: pnpm run lint | |
- name: Run Stylelint | |
run: pnpm run stylelint | |
- name: Run Prettier | |
run: pnpm run prettier | |
build: | |
runs-on: ubuntu-latest #运行在虚拟机环境ubuntu-latest | |
steps: | |
- name: checkout code repository # 步骤的名字 切到对应的分支 | |
uses: actions/checkout@v2 # 使用actions/checkout@v2这个action | |
with: # 这个action的参数 | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: ./.github/actions/pnpm | |
with: | |
cache: '.pnpm-store' | |
- name: Run Test | |
run: pnpm run test | |
- name: Run Build | |
run: pnpm -r build |