add test stage in workflow
Some checks failed
/ test (push) Failing after 1m5s
/ deploy (push) Successful in 17s

This commit is contained in:
j3d1 2024-11-09 05:28:27 +01:00
parent fde173baf7
commit 08f36249a9

View file

@ -1,6 +1,29 @@
on: [ push ] on: [ push ]
jobs: jobs:
test: 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 projects 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 runs-on: docker
container: container:
image: docker.io/serversideup/ansible:latest image: docker.io/serversideup/ansible:latest