ci: add backend workflow for lint, tests, and audit checks #2
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
| name: Backend CI | |
| on: | |
| pull_request: | |
| paths: | |
| - 'backend/**' | |
| jobs: | |
| backend-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install backend dependencies | |
| run: npm install | |
| working-directory: backend | |
| - name: Start backend briefly | |
| run: | | |
| node backend/server.js & | |
| sleep 5 | |
| kill $! || true | |
| - name: Run security audit | |
| run: npm audit || true |