From d0ce43a4fa31603a479a6e6afc2b3165763f16b5 Mon Sep 17 00:00:00 2001 From: Elijah Date: Fri, 12 Jan 2024 09:47:44 +0100 Subject: [PATCH] Run the pipeline from already installed Python3 version --- .gitea/workflows/ci-pipeline.yaml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index f1aab5a..ee87bf1 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -15,7 +15,32 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Check if Python is installed by default + - name: Check if Python is installed run: | - python3 -c "print('Hi')" + python3 -c "print('Python is installed')" + + - 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