[Workflow Handoffs] Phase 6: On-demand prompt generation #80
Workflow file for this run
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
| # Runs automated quality checks on pull requests before merging. | |
| # Validates code quality by running extension unit tests and agent file linting. | |
| # Serves as a quality gate to prevent broken code or oversized agent files from being merged. | |
| name: PR Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - 'feature/**' | |
| paths: | |
| - 'src/**' | |
| - 'agents/**' | |
| - 'scripts/**' | |
| - '.github/workflows/pr-checks.yml' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Compile extension | |
| run: npm run compile | |
| - name: Run extension unit tests | |
| run: | | |
| # Install xvfb for headless VS Code testing | |
| # xvfb provides a virtual display server, required for VS Code's Electron environment | |
| sudo apt-get update | |
| sudo apt-get install -y xvfb | |
| # Run tests with virtual display | |
| # xvfb-run -a automatically finds an available display number | |
| xvfb-run -a npm test | |
| env: | |
| # Prevent VS Code from showing UI during tests | |
| DISPLAY: ':99.0' | |
| - name: Lint agent files | |
| run: npm run lint:agent:all | |
| - name: PR checks summary | |
| if: success() | |
| run: | | |
| echo "✅ All PR checks passed!" | |
| echo "- Extension unit tests: PASSED" | |
| echo "- Agent linting: PASSED" |