Skip to content

refactor: remove flaky E2E tests from CI, keep unit + API tests #6

refactor: remove flaky E2E tests from CI, keep unit + API tests

refactor: remove flaky E2E tests from CI, keep unit + API tests #6

Workflow file for this run

name: Test Suite
on:
push:
branches: [main, local_node_refactor]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
timeout-minutes: 10
- name: Run unit tests
run: npm run test:unit
timeout-minutes: 5
- name: Start server
run: |
npm start &
echo $! > server.pid
timeout-minutes: 2
- name: Wait for server
run: |
for i in {1..30}; do
if curl -s http://localhost:13331/api/health > /dev/null; then
echo "Server is ready"
exit 0
fi
echo "Waiting for server... ($i/30)"
sleep 2
done
echo "Server failed to start"
exit 1
timeout-minutes: 2
- name: Run backend API tests
run: npm run test:api
timeout-minutes: 10
- name: Stop server
if: always()
run: |
if [ -f server.pid ]; then
kill $(cat server.pid) || true
rm server.pid
fi
timeout-minutes: 2