Bump akhilmhdh/contributors-readme-action from 2.3.8 to 2.3.10 #55
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: Code Review | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
code-review: | |
name: Code Review | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 # 将代码库检出到 Runner 中 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 # 安装 Node.js 运行环境和依赖项 | |
with: | |
node-version: '14.x' | |
- name: Install dependencies | |
run: npm install # 安装依赖项 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 # 初始化 CodeQL 环境 | |
with: | |
languages: javascript | |
- name: Analyze JavaScript code with CodeQL | |
uses: github/codeql-action/analyze@v3 # 使用 CodeQL 对 JavaScript 代码进行分析 | |
# 这个 workflow 文件使用 `pull_request` 事件来监听新的 PR 提交,并且只有针对主分支的操作才会触发它。code-review job 使用 `actions/checkout` action 将代码库检出到 runner 中,使用 `actions/setup-node` action 安装 Node.js 运行环境和依赖包,接着通过运行 `npm run lint` 进行代码风格检查和运行 `npm test` 命令来运行测试。最后,在 Setup code review 步骤中,我们使用 `reviewdog/action-eslint` action 来进行代码审查,并将输出级别设置为 `error`。 | |
# | |
# 需要注意的是,在此示例中,我们使用了 Eslint 工具来进行代码风格检查。如果您的项目使用其他工具或规则,请相应地更改该命令或引用其他 action。 |