Skip to content

Add CI workflow with Docker validation, shell linting, and Python checks#3

Draft
Copilot wants to merge 6 commits into
masterfrom
copilot/update-pet-app-workflow
Draft

Add CI workflow with Docker validation, shell linting, and Python checks#3
Copilot wants to merge 6 commits into
masterfrom
copilot/update-pet-app-workflow

Conversation

Copilot AI commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Implements comprehensive CI validation for the q-mem-stack repository infrastructure.

Changes

  • Docker validation: Validates docker-compose.yml and builds both Dockerfiles (base and CUDA)
  • Shell script linting: Runs shellcheck on all .sh files to catch common issues
  • Python validation: Lints with flake8 and validates syntax across all .py files

Configuration

permissions:
  contents: read  # Minimal required permissions

jobs:
  validate-docker:
    # Validates compose config and both Dockerfile builds
  
  lint-scripts:
    # Runs shellcheck -x on all shell scripts
  
  validate-python:
    # Flake8 linting + syntax validation
    # Includes pip caching for performance

Triggers on push/PR to master/main branches and manual dispatch.

Also updates .gitignore to exclude Python cache directories.

Original prompt

Reference: https://github.com/igor-holt/pet-app/actions/runs/20442628882/job/59345264049
Copilot task


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 9, 2026 22:38
- Added CI workflow for Docker build validation
- Added shell script linting with shellcheck
- Added Python validation
- Workflow triggers on push and pull requests to master/main branches

Co-authored-by: igor-holt <125706350+igor-holt@users.noreply.github.com>
Co-authored-by: igor-holt <125706350+igor-holt@users.noreply.github.com>
- Fixed invalid flake8 error code F63
- Added pip caching to improve workflow performance
- Updated Python syntax check to validate all .py files

Co-authored-by: igor-holt <125706350+igor-holt@users.noreply.github.com>
Set permissions to contents: read to follow security best practices

Co-authored-by: igor-holt <125706350+igor-holt@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow for pet application Add CI workflow with Docker validation, shell linting, and Python checks Jan 9, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jan 24, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
q-mem-stack b5cce8d Jan 24 2026, 10:24 PM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions CI workflow to validate repository infrastructure artifacts (Docker, shell scripts, and Python), and updates ignore rules for Python cache output.

Changes:

  • Introduces a CI workflow to validate docker-compose.yml and build both Docker images.
  • Adds ShellCheck linting across all .sh scripts.
  • Adds Python validation via flake8 (fatal-only) and py_compile.
  • Updates .gitignore to exclude Python __pycache__ directories.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
.gitignore Ignores Python bytecode cache directories.
.github/workflows/ci.yml Implements CI jobs for Docker validation, shell linting, and Python checks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +22 to +29
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Validate docker-compose.yml
run: docker compose config

- name: Build main Dockerfile
run: docker build -f Dockerfile .

Copilot AI Jan 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow sets up Docker Buildx but then uses docker build (not docker buildx build). This step is effectively unused and adds time/complexity. Either remove the Buildx setup step or switch the build commands to docker buildx build if Buildx features/caching are desired.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +57 to +61
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'

Copilot AI Jan 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python-version: '3.x' makes CI run on whatever the latest Python 3 release is on GitHub runners, which can introduce unexpected breakages over time. Since the repo’s runtime image is pinned to Python 3.11 (Dockerfile:1), consider pinning CI to the same minor version (e.g., 3.11) to keep validation aligned and reproducible.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +59 to +66
with:
python-version: '3.x'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8

Copilot AI Jan 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pip caching is enabled, but the repo doesn’t include a standard dependency lock/file (e.g., requirements.txt / pyproject.toml). With only flake8 being installed here, caching likely won’t provide much benefit and may create a less meaningful cache key. Consider removing cache: 'pip' or adding an explicit cache-dependency-path that exists in this repo.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants