feat: auto-retry on connection errors + keepAlive support for pg Pool (#13) #96
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: CI | |
| on: | |
| push: | |
| branches: [main, develop, 'release/**', 'feature/**', 'hotfix/**'] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Security audit | |
| run: docker run --rm -v "$(pwd)":/app:ro -w /app node:22-alpine npm audit | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build test container | |
| run: docker compose -f docker-compose.test.yml build --build-arg NODE_VERSION=${{ matrix.node-version }} | |
| - name: Run unit tests | |
| run: docker compose -f docker-compose.test.yml run --rm test-unit | |
| integration-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build test container | |
| run: docker compose -f docker-compose.test.yml build | |
| - name: Run integration tests | |
| run: docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from test-integration test-integration | |
| - name: Cleanup | |
| if: always() | |
| run: docker compose -f docker-compose.test.yml down -v |