code-review.yml 597 B

12345678910111213141516171819202122232425262728
  1. # 当有人提交 PR 请求时自动进行代码检查,检查通过后才能合并代码,不通过给出错误提示
  2. name: CODE REVIEW
  3. on:
  4. pull_request:
  5. branches:
  6. - main
  7. jobs:
  8. code-review:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout
  12. uses: actions/checkout@v2
  13. - name: Setup Node.js environment
  14. uses: actions/setup-node@v1
  15. with:
  16. node-version: 18.x
  17. - name: Install dependencies
  18. run: npm install
  19. ## 执行 npm run lint 检查代码
  20. - name: Run code review
  21. run: |
  22. npm run lint