Dockerize #30
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: Django CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Run Django Tests | |
runs-on: ubuntu-latest | |
env: | |
DJANGO_SETTINGS_MODULE: gcom.settings | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: '1.8.2' | |
- name: Install the project dependencies | |
working-directory: ./src | |
run: | | |
poetry config virtualenvs.create true --local | |
poetry install | |
- name: Verify Django Installation | |
working-directory: ./src | |
run: poetry run python -m django --version | |
- name: Run Django tests | |
shell: bash | |
working-directory: ./src | |
run: poetry run python manage.py test |