Skip to content

Commit

Permalink
github actions python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Jun 25, 2024
1 parent 1526f09 commit cd61b70
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,35 @@ jobs:
matrix:
python-version: ["3.10.12"]

# Service containers to run with `test`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:15.2
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
# with:
Expand All @@ -25,6 +54,10 @@ jobs:
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
libpoppler-cpp-dev
python3-opencv \
postgresql-client \
ffmpeg \
libzbar0
- name: Install python dependencies
run: |
Expand Down

0 comments on commit cd61b70

Please sign in to comment.