changed django.yml

This commit is contained in:
Vangipuram Nitin 2024-07-19 15:07:12 +05:30 committed by GitHub
parent 9990cdfa5a
commit 6a46dc0dcd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 32 additions and 31 deletions

View File

@ -1,11 +1,11 @@
name: Django CI name: Django CI
on: on:
push: push:
branches: ["main"] branches: [ "main" ]
pull_request: pull_request:
branches: ["main"] branches: [ "main" ]
env: env:
HOSTING_URL: "http://localhost:8000/" HOSTING_URL: "http://localhost:8000/"
DEBUG: True DEBUG: True
EMAIL: karthik.murakonda14@gmail.com EMAIL: karthik.murakonda14@gmail.com
@ -24,9 +24,10 @@ env:
EMAIL_ID: 200010030@iitdh.ac.in EMAIL_ID: 200010030@iitdh.ac.in
ROLL_NO: 200010030 ROLL_NO: 200010030
jobs: jobs:
build: build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
services: services:
postgres: postgres:
@ -39,25 +40,25 @@ jobs:
- 5432:5432 - 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy: strategy:
max-parallel: 4 max-parallel: 4
matrix: matrix:
python-version: [3.9] python-version: [3.9]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3 uses: actions/setup-python@v3
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install Dependencies - name: Install Dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
- name: Run Tests - name: Run Tests
run: | run: |
cd CDC_Backend cd CDC_Backend
python manage.py collectstatic python manage.py collectstatic
python manage.py makemigrations python manage.py makemigrations
python manage.py makemigrations APIs python manage.py makemigrations APIs
python manage.py test python manage.py test