Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add poetry to django.yaml as well #16

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/django.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ on:
required: False
type: boolean
default: True
# Dependency manager config
dependencyManager:
required: False
description: "Dependency manager to use (e.g., pipenv, poetry)"
default: "pipenv"
jobs:
django-check:
name: Django Check
Expand All @@ -45,21 +50,28 @@ jobs:
cd ${{ inputs.path }}
pip install pipenv
pipenv install --deploy --dev
if: ${{ inputs.dependencyManager == "pipenv" }}
- name: Install Poetry
uses: snok/install-poetry@v1
if: ${{ inputs.dependencyManager == "poetry" }}
- name: Install Dependencies (poetry)
run: poetry install --no-root
if: ${{ inputs.dependencyManager == "poetry" }}
- name: Lint (flake8)
run: |-
cd ${{ inputs.path }}
pipenv run flake8 .
${{ inputs.dependencyManager }} run flake8 .
if: ${{ inputs.flake }}
- name: Lint (black)
run: |-
cd ${{ inputs.path }}
pipenv run black --check .
${{ inputs.dependencyManager }} run black --check .
if: ${{ inputs.black }}
- name: Test (run in parallel)
run: |-
cd ${{ inputs.path }}
pipenv run coverage run --concurrency=multiprocessing manage.py test --settings=${{ inputs.projectName }}.settings.ci --parallel
pipenv run coverage combine
${{ inputs.dependencyManager }} run coverage run --concurrency=multiprocessing manage.py test --settings=${{ inputs.projectName }}.settings.ci --parallel
${{ inputs.dependencyManager }} run coverage combine
container:
image: python:${{ inputs.pythonVersion }}
env:
Expand Down