IdHub/.gitea/workflows/ci-pipeline.yaml

51 lines
941 B
YAML
Raw Normal View History

name: Django CI Pipeline
on:
push:
branches:
- main
- release
- testing-pipeline
jobs:
build:
2024-01-09 08:58:00 +00:00
runs-on: ubuntu-22.04
steps:
2024-01-04 20:20:32 +00:00
- uses: actions/checkout@v4
- name: Check if Python is installed
run: |
python3 -c "print('Python is installed')"
2024-01-12 08:49:08 +00:00
- name: Install python3-venv
run: |
apt-get install python3-venv
- name: Create virtual environment
run: |
python3 -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