From 08f36249a9cd66db6141ed17f5e54f4ae2220948 Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 9 Nov 2024 05:28:27 +0100 Subject: [PATCH] add test stage in workflow --- .forgejo/workflows/deploy.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 3d3e7d5..6f1a913 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -1,6 +1,29 @@ -on: [push] +on: [ push ] jobs: test: + runs-on: docker + container: + image: docker.io/python:latest + steps: + - name: Check out the code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' # Adjust to your Django project’s Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run migrations + run: python manage.py migrate + + - name: Run tests + run: python manage.py test + deploy: runs-on: docker container: image: docker.io/serversideup/ansible:latest