-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7735230
commit a851892
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Django testing | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
SECRET_KEY: 'COMMIT_${SHORT_SHA}' | ||
|
||
services: | ||
postgres: | ||
image: postgres:11 | ||
env: | ||
POSTGRES_DB: l2 | ||
POSTGRES_PASSWORD: 123456 | ||
POSTGRES_USER: postgres | ||
ports: ['5432:5432'] | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-tests.txt | ||
- name: Migrate | ||
run: | | ||
python manage.py migrate | ||
- name: Make migrations | ||
run: | | ||
python manage.py makemigrations | ||
- name: Migrate | ||
run: | | ||
python manage.py migrate | ||
- name: Run Tests | ||
run: | | ||
python manage.py test |