Skip to content

UKnowWhoIm/django-test-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Test CI Action

A Django CI Github Action which runs your tests with a postgres database.

NOTE: You can use the DB service of your choice for your django app, using this action won't restrict you to postgres

Arguments

settings-dir-path

The relative path of the directory containing your settings file. This is used to integrate the DB with your app.

This value is required

parallel-tests

Enable/Disable Parallel Tests. Default is false.

requirements-file

Path of the file containing the dependancies, default is requirements.txt

env-file

Path of the the file containing additional environment variables.

SECRET_KEY, DEBUG and DATABASES are automatically set, if your django app depends on any other environment variable, set them in this file or set them like this

name: Django CI
env: 
  - API_KEY: "dummy_api_key"

WARNING: Don't store sensitive data, use random dummy data only

If you have to use sensitive data, store them as a repository secret and include them in the workflow file.

steps:
  - name: Django CI
    env: 
      super_secret: ${{ secrets.SuperSecret }}

Workflow Example

uses: actions/checkout@v2
name: Django CI
uses: UKnowWhoIm/django-test-action@v0.6
with:
  settings-dir-path: "testproject"