Skip to content

Commit

Permalink
Create workflow to run pytests using github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DEENUU1 committed Dec 5, 2023
1 parent 3a02023 commit afedd18
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run Tests

on: [push, pull_request]

jobs:
test:
name: Run pytest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Install dependencies
run: pip install -r requirements.txt

- name: Migrations
working-directory: ./
run: |
python manage.py makemigrations
python manage.py migrate
- name: Run pytest
env:
SECRET_KEY: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
working-directory: ./
run: |
pytest

0 comments on commit afedd18

Please sign in to comment.