Add comprehensive GitHub Actions CI/CD pipeline for Elisp, Org-mode, and JavaScript testing #2
This file contains hidden or 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 Pipeline | ||
| on: | ||
| push: | ||
| branches: [ main, develop, "copilot/**" ] | ||
| pull_request: | ||
| branches: [ main, develop ] | ||
| workflow_dispatch: | ||
| jobs: | ||
| # Quick checks that run first | ||
| pre-checks: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Check for merge conflicts | ||
| run: | | ||
| if git grep -rn "^<<<<<<< " . ; then | ||
| echo "Merge conflict markers found!" | ||
| exit 1 | ||
| fi | ||
| - name: Check file permissions | ||
| run: | | ||
| if find . -name "*.el" -executable -type f | grep -q .; then | ||
| echo "Found executable .el files (should not be executable)" | ||
| find . -name "*.el" -executable -type f | ||
| exit 1 | ||
| fi | ||
| - name: Check for large files | ||
| run: | | ||
| large_files=$(find . -type f -size +1M -not -path "*/\.*" -not -path "*/node_modules/*") | ||
| if [ -n "$large_files" ]; then | ||
| echo "Warning: Large files found:" | ||
| echo "$large_files" | ||
| fi | ||
| continue-on-error: true | ||
| # Elisp checks | ||
| elisp-checks: | ||
| needs: pre-checks | ||
| uses: ./.github/workflows/elisp-compile.yml | ||
| elisp-lint: | ||
| needs: pre-checks | ||
| uses: ./.github/workflows/elisp-lint.yml | ||
|
Check failure on line 49 in .github/workflows/ci-pipeline.yml
|
||
| elisp-tests: | ||
| needs: [elisp-checks, elisp-lint] | ||
| uses: ./.github/workflows/elisp-test.yml | ||
| # Org-mode checks | ||
| org-validation: | ||
| needs: pre-checks | ||
| uses: ./.github/workflows/org-mode-validation.yml | ||
| # JavaScript checks | ||
| javascript-checks: | ||
| needs: pre-checks | ||
| uses: ./.github/workflows/javascript-ci.yml | ||
| # Documentation | ||
| documentation: | ||
| needs: pre-checks | ||
| uses: ./.github/workflows/documentation-check.yml | ||
| # Code quality | ||
| code-quality: | ||
| needs: pre-checks | ||
| uses: ./.github/workflows/code-quality.yml | ||
| # Security (runs in parallel with others) | ||
| security: | ||
| needs: pre-checks | ||
| uses: ./.github/workflows/security-scan.yml | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
| # Final summary | ||
| ci-summary: | ||
| runs-on: ubuntu-latest | ||
| needs: [elisp-checks, elisp-lint, elisp-tests, org-validation, javascript-checks, documentation, code-quality] | ||
| if: always() | ||
| steps: | ||
| - name: Check job statuses | ||
| run: | | ||
| echo "CI Pipeline Summary:" | ||
| echo "===================" | ||
| echo "Elisp Checks: ${{ needs.elisp-checks.result }}" | ||
| echo "Elisp Lint: ${{ needs.elisp-lint.result }}" | ||
| echo "Elisp Tests: ${{ needs.elisp-tests.result }}" | ||
| echo "Org Validation: ${{ needs.org-validation.result }}" | ||
| echo "JavaScript: ${{ needs.javascript-checks.result }}" | ||
| echo "Documentation: ${{ needs.documentation.result }}" | ||
| echo "Code Quality: ${{ needs.code-quality.result }}" | ||
| if [ "${{ needs.elisp-checks.result }}" == "failure" ] || \ | ||
| [ "${{ needs.elisp-lint.result }}" == "failure" ] || \ | ||
| [ "${{ needs.elisp-tests.result }}" == "failure" ]; then | ||
| echo "" | ||
| echo "Critical checks failed!" | ||
| exit 1 | ||
| fi | ||
| - name: Report success | ||
| if: success() | ||
| run: | | ||
| echo "✓ All CI checks passed!" | ||
| echo "The code is ready for review." | ||