| 1 | name: Integration |
| 2 | on: |
| 3 | pull_request: |
| 4 | paths: |
| 5 | - "src/**" |
| 6 | - "migrations/**" |
| 7 | jobs: |
| 8 | integration: |
| 9 | runs-on: ubuntu-latest |
| 10 | timeout-minutes: 30 |
| 11 | services: |
| 12 | postgres: |
| 13 | image: postgres:16 |
| 14 | env: |
| 15 | POSTGRES_PASSWORD: postgres |
| 16 | POSTGRES_DB: app_test |
| 17 | ports: |
| 18 | - 5432:5432 |
| 19 | options: >- |
| 20 | --health-cmd pg_isready |
| 21 | --health-interval 10s |
| 22 | --health-timeout 5s |
| 23 | --health-retries 5 |
| 24 | redis: |
| 25 | image: redis:7 |
| 26 | ports: ["6379:6379"] |
| 27 | steps: |
| 28 | - uses: actions/checkout@v4 |
| 29 | - run: ./scripts/test-integration.sh |
| 30 | env: |
| 31 | DATABASE_URL: postgres://postgres:postgres@localhost:5432/app_test |
| 32 | REDIS_URL: redis://localhost:6379 |