forked from Kamva-Academy/Kamva-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
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
b242218
commit 55675d8
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
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,41 @@ | ||
name: Django Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- test-ci | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
sqlite: | ||
image: python:3 | ||
env: | ||
SQLITE_DB: test_db.sqlite3 | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Prepare SQLite database | ||
run: | | ||
python manage.py makemigrations | ||
python manage.py migrate | ||
|
||
- name: Run tests | ||
run: | | ||
python manage.py test apps.report | ||
Empty file.
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. | ||
class HelloWorldTest(TestCase): | ||
def test_hello_world(self): | ||
print("Hello, world!") | ||
|