-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use GH actions services for Redis and Postgres
- Loading branch information
Showing
1 changed file
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|