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

[#2024-03] Configure Github Actions for Django project with PostgreSQL #91

Merged
merged 9 commits into from
Mar 25, 2024

Conversation

delano
Copy link
Contributor

@delano delano commented Mar 25, 2024

User description

  • Use Python 3.11 container
  • Update PostgreSQL version to 16.2-bookworm
  • Set PostgreSQL connection details in environment variables
  • Configure service to wait for PostgreSQL availability on start
  • Run Django collectstatic command
  • Execute Django tests for afbcore app

Type

Enhancement, Tests


Changes walkthrough

Relevant files
Enhancement
audit.yml
Add UI app build, test and audit steps                                     

.github/workflows/audit.yml

  • Added Node.js setup and dependencies installation for UI app
  • Added build and test steps for Nuxt3 UI app
  • Added dependency audit step for UI app
  • +24/-1   
    django.yml
    Configure Django workflow with PostgreSQL                               

    .github/workflows/django.yml

  • Updated to use Python 3.11 container
  • Updated PostgreSQL version to 16.2
  • Set PostgreSQL connection details via environment variables
  • Added step to run Django migrations
  • Added step to run Django collectstatic
  • Restricted workflow to run only on API code changes
  • Commented out caching steps
  • +48/-29 

    - Use Python 3.11 container
    - Update PostgreSQL version to 16.2-bookworm
    - Set PostgreSQL connection details in environment variables
    - Configure service to wait for PostgreSQL availability on start
    - Run Django collectstatic command
    - Execute Django tests for afbcore app
    @delano delano self-assigned this Mar 25, 2024
    delano and others added 8 commits March 24, 2024 21:05
    Cache system packages and python dependencies
    Run database migrations before running tests
    Improve efficiency for repeated workflow runs
    Ensure consistent state for test environment
    Also only run on API code changes
    
    Restrict workflow to API dir changes
    Comment out system package and pip caching
    No newline at end of file
    …com:AnimalFoodBank/afb-requests into delano/2024-03-22-github-actions
    re: "ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
    Error: Process completed with exit code 1."
    Fix pip audit job name in workflow
    Add pnpm install step before Nuxt build
    Remove extra Django install in workflow
    Rename collectstatic job in workflow
    Capitalize Django in requirements.txt
    - Migrate to Django 5.0.3 to leverage new features and improvements
    - Update drf-spectacular dependency to use local Swagger UI and Redoc instead of CDN
    Copy link

    joshua-keaton bot commented Mar 25, 2024

    PR Description updated to latest commit (7be61b7)

    @delano delano merged commit 7a614af into main Mar 25, 2024
    0 of 3 checks passed
    @delano delano deleted the delano/2024-03-22-github-actions branch March 25, 2024 06:36
    Copy link

    joshua-keaton bot commented Mar 25, 2024

    PR Agent Walkthrough

    🤖 Welcome to the PR Agent, an AI-powered tool for automated pull request analysis, feedback, suggestions and more.

    Here is a list of tools you can use to interact with the PR Agent:

    ToolDescriptionInvoke Interactively 💎

    DESCRIBE

    Generates PR description - title, type, summary, code walkthrough and labels
    • Run

    REVIEW

    Adjustable feedback about the PR, possible issues, security concerns, review effort and more
    • Run

    IMPROVE

    Code suggestions for improving the PR.
    • Run

    ANALYZE 💎

    Identifies code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component.
    • Run

    UPDATE CHANGELOG

    Automatically updates the changelog.
    • Run

    ADD DOCUMENTATION 💎

    Generates documentation to methods/functions/classes that changed in the PR.
    • Run

    ASK

    Answering free-text questions about the PR.

    [*]

    GENERATE CUSTOM LABELS

    Generates custom labels for the PR, based on specific guidelines defined by the user

    [*]

    TEST 💎

    Generates unit tests for a specific component, based on the PR code change.

    [*]

    CI FEEDBACK 💎

    Generates feedback and analysis for a failed CI job.

    [*]

    CUSTOM SUGGESTIONS 💎

    Generates custom suggestions for improving the PR code, based on specific guidelines defined by the user.

    [*]

    SIMILAR ISSUE

    Automatically retrieves and presents similar issues.

    [*]

    (1) Note that each tool be triggered automatically when a new PR is opened, or called manually by commenting on a PR.

    (2) Tools marked with [*] require additional parameters to be passed. For example, to invoke the /ask tool, you need to comment on a PR: /ask "<question content>". See the relevant documentation for each tool for more details.

    @delano delano linked an issue Mar 27, 2024 that may be closed by this pull request
    @delano delano changed the title [#2024-03] Configure GA for Django project with PostgreSQL [#2024-03] Configure Github Actions for Django project with PostgreSQL Apr 12, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: ✔️ Done
    Development

    Successfully merging this pull request may close these issues.

    Integrate PR Agent
    1 participant