Skip to content

Instantly share code, notes, and snippets.

@mitchtabian
Created February 11, 2023 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchtabian/c59e7aab07e33c96f8724ec1219b2258 to your computer and use it in GitHub Desktop.
Save mitchtabian/c59e7aab07e33c96f8724ec1219b2258 to your computer and use it in GitHub Desktop.
name: Django CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: github_actions
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests'
env:
SECRET_KEY: 69tgugtg%^fgJO&*&
DB_NAME: github_actions
DB_USER: postgres
DB_PASSWORD: postgres
DJANGO_ALLOWED_HOSTS: localhost 127.0.0.1 [::1]
DEBUG_MODE: False
TIME_ZONE: US/Pacific
CACHE_KEY_PREFIX: Halo
GOOGLE_AUTH_CLIENT_ID: whocares
GOOGLE_AUTH_CLIENT_SECRET: whocares2
EMAIL_ID: dunno
EMAIL_PASSWORD: dunno2
run: |
python manage.py test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment