ci.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: CI
  2. on:
  3. push:
  4. branches: [main, master]
  5. pull_request:
  6. branches: [main, master]
  7. jobs:
  8. lint-markdown:
  9. name: Lint Markdown
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v4
  13. - name: Setup Node.js
  14. uses: actions/setup-node@v4
  15. with:
  16. node-version: '20'
  17. - name: Install markdownlint-cli
  18. run: npm install -g markdownlint-cli
  19. - name: Run markdownlint
  20. run: markdownlint '**/*.md' --ignore node_modules --ignore libs/external || true
  21. check-links:
  22. name: Check Links
  23. runs-on: ubuntu-latest
  24. steps:
  25. - uses: actions/checkout@v4
  26. - name: Link Checker
  27. uses: lycheeverse/lychee-action@v1
  28. with:
  29. args: --verbose --no-progress './**/*.md' --exclude-path libs/external
  30. fail: false
  31. validate-structure:
  32. name: Validate Project Structure
  33. runs-on: ubuntu-latest
  34. steps:
  35. - uses: actions/checkout@v4
  36. - name: Check required files
  37. run: |
  38. echo "Checking required files..."
  39. files=("README.md" "LICENSE" "CONTRIBUTING.md" "CODE_OF_CONDUCT.md" "AGENTS.md" "CLAUDE.md")
  40. for file in "${files[@]}"; do
  41. if [ -f "$file" ]; then
  42. echo "✓ $file exists"
  43. else
  44. echo "✗ $file missing"
  45. fi
  46. done
  47. - name: Check i18n structure
  48. run: |
  49. echo "Checking i18n directories..."
  50. for lang in zh en; do
  51. if [ -d "i18n/$lang" ]; then
  52. echo "✓ i18n/$lang exists"
  53. else
  54. echo "✗ i18n/$lang missing"
  55. fi
  56. done