You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

55 lines
1.4 KiB

  1. name: Linter
  2. on:
  3. pull_request:
  4. workflow_dispatch:
  5. push:
  6. branches: [ develop ]
  7. permissions:
  8. contents: read
  9. concurrency:
  10. group: commitcheck-xhiveframework-${{ github.event.number }}
  11. cancel-in-progress: true
  12. jobs:
  13. commit-lint:
  14. name: 'Semantic Commits'
  15. runs-on: ubuntu-latest
  16. if: github.event_name == 'pull_request'
  17. steps:
  18. - uses: actions/checkout@v3
  19. with:
  20. fetch-depth: 200
  21. - uses: actions/setup-node@v3
  22. with:
  23. node-version: 16
  24. check-latest: true
  25. - name: Check commit titles
  26. run: |
  27. npm install @commitlint/cli @commitlint/config-conventional
  28. npx commitlint --verbose --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}
  29. linter:
  30. name: 'Xhiveframework Linter'
  31. runs-on: ubuntu-latest
  32. if: github.event_name == 'pull_request'
  33. steps:
  34. - uses: actions/checkout@v3
  35. - uses: actions/setup-python@v4
  36. with:
  37. python-version: '3.10'
  38. - uses: pre-commit/action@v3.0.0
  39. - name: Download Semgrep rules
  40. run: git clone --depth 1 https://github.com/xhiveframework/semgrep-rules.git xhiveframework-semgrep-rules
  41. - name: Run Semgrep rules
  42. run: |
  43. pip install semgrep==0.97.0
  44. semgrep ci --config ./xhiveframework-semgrep-rules/rules --config r/python.lang.correctness