Skip to content

Commit

Permalink
Use GH actions services for Redis and Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Oct 22, 2024
1 parent 4c4fcbe commit 25daed4
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@ on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.11.x"]
env:
redis-version: "6.2"
pg-version: "15"
runs-on: ubuntu-22.04

services:
redis:
image: redis:6.2-alpine
ports:
- 6379:6379
postgres:
image: postgis/postgis:15-3.3-alpine
env:
POSTGRES_DB: ureport
POSTGRES_USER: ureport
POSTGRES_PASSWORD: nyaruka
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install PostgreSQL
uses: harmon758/postgresql-action@v1
with:
postgresql version: ${{ env.pg-version }}
postgresql db: ureport
postgresql user: ureport
postgresql password: nyaruka

- name: Install Redis
uses: zhulik/[email protected]
with:
redis version: ${{ env.redis-version }}

- name: Install Python
uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit 25daed4

Please sign in to comment.