Merge pull request #797 from hackerspace-ntnu/788-translation-tag #1165
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade --force-reinstall -r prod_requirements.txt | |
- name: | |
Initialize Django | |
# Stop the build if migrations are not committed to repo. If action stops here, | |
# run `pt manage.py makemigrations` and commit the generated files. | |
run: | | |
python manage.py makemigrations --check | |
python manage.py migrate | |
- name: Run pre-commit hooks | |
run: | | |
pre-commit run --all-files | |
- name: Run Django tests | |
run: | | |
python manage.py test |