Skip to content

Commit

Permalink
Merge pull request #6 from d4x1/dev-github-action
Browse files Browse the repository at this point in the history
add postgres db
  • Loading branch information
d4x1 authored Mar 23, 2024
2 parents c000f40 + 63b6a6c commit b11bcaa
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/demo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: [push]
on: []
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ on:
jobs:
My-Job-Name:
runs-on: ubuntu-latest

services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:15.6
# Provide the password for postgres
env:
POSTGRES_DB: ace_the_exam
POSTGRES_USER: acetheexam
POSTGRES_PASSWORD: acetheexam
# 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

steps:
- uses: actions/checkout@v4

Expand All @@ -29,6 +50,8 @@ jobs:
pip install -r requirements.txt
- name: Test with pytest
env:
E2E_DB_URL: postgres://acetheexam:acetheexam@db:5432/ace_the_exam
run: |
python manage.py test
python manage.py check

0 comments on commit b11bcaa

Please sign in to comment.