49 lines
911 B
YAML
49 lines
911 B
YAML
name: Django CI Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- release
|
|
- testing-pipeline
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
# Version being used in local development
|
|
python-version: '3.10.12'
|
|
|
|
- name: Create virtual environment
|
|
run: |
|
|
python -m venv venv
|
|
source venv/bin/activate
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run makemigrations
|
|
run: |
|
|
source venv/bin/activate
|
|
python manage.py makemigrations
|
|
|
|
- name: Run migrate
|
|
run: |
|
|
source venv/bin/activate
|
|
python manage.py migrate
|
|
|
|
- name: Run tests
|
|
run: |
|
|
source venv/bin/activate
|
|
python manage.py test
|
|
|