ci: simplify to single validation job #4
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| validate: | |
| 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.x' | |
| - name: Install server dependencies | |
| run: npm install | |
| working-directory: ./server | |
| - name: Check server starts | |
| run: | | |
| timeout 10 npm start & | |
| sleep 5 | |
| curl -f http://localhost:8080/ || exit 1 | |
| working-directory: ./server | |
| env: | |
| PORT: 8080 | |
| NODE_ENV: test |