Skip to content

Created feature/ci-cd pipeline and project setup #2

Created feature/ci-cd pipeline and project setup

Created feature/ci-cd pipeline and project setup #2

Workflow file for this run

name: Python CI/CD
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.12]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Clear pip cache
run: |
python -m pip cache purge
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install dependencies
run: |
pip install -r requirements.txt --index-url https://pypi.org/simple
- name: Run database migrations
run: |
python manage.py migrate
- name: Run Black formatter check
run: |
black .
- name: Run tests with coverage
run: |
python manage.py test