Skip to content

Comments

Add GitHub Actions CI for backend and frontend#2

Merged
mangod12 merged 2 commits intomainfrom
copilot/add-ci-configuration
Feb 23, 2026
Merged

Add GitHub Actions CI for backend and frontend#2
mangod12 merged 2 commits intomainfrom
copilot/add-ci-configuration

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

No CI existed to validate backend syntax or frontend build integrity on push/PR.

Changes

.github/workflows/ci.yml — two parallel jobs:

  • Backend (Python 3.12): pip-cached install of backend/requirements.txt, py_compile validation of all .py files, optional pytest if tests directory is present
  • Frontend (Node 20): node_modules cache keyed on package-lock.json + package.json, npm install, npm run build — fails job on build error
  • Workflow-level permissions: contents: read to minimize GITHUB_TOKEN scope

README.md — CI status badge added to the header badge row.

jobs:
  backend:
    ...
    steps:
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
          cache: "pip"
          cache-dependency-path: backend/requirements.txt

  frontend:
    ...
    steps:
      - uses: actions/cache@v4
        with:
          path: skydash/frontend/node_modules
          key: ${{ runner.os }}-node-${{ hashFiles('skydash/frontend/package-lock.json', 'skydash/frontend/package.json') }}

💡 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.

Co-authored-by: mangod12 <140415797+mangod12@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CI workflow for backend and frontend validation Add GitHub Actions CI for backend and frontend Feb 23, 2026
@mangod12 mangod12 marked this pull request as ready for review February 23, 2026 18:42
Copilot AI review requested due to automatic review settings February 23, 2026 18:42
@mangod12 mangod12 merged commit f4bdda4 into main Feb 23, 2026
6 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds GitHub Actions CI/CD workflows to validate backend Python syntax and frontend build integrity on push and pull requests. The implementation addresses the "CI/CD Pipeline" item mentioned in the project's technical debt section (README.md:299).

Changes:

  • Added .github/workflows/ci.yml with parallel backend (Python 3.12 syntax validation via py_compile, optional pytest) and frontend (Node 20 build verification) jobs
  • Added CI status badge to README.md header

Reviewed changes

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

File Description
.github/workflows/ci.yml New CI workflow with backend Python compilation checks and frontend build validation, includes caching for pip and node_modules
README.md Added CI status badge linking to workflow runs

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

uses: actions/cache@v4
with:
path: skydash/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('skydash/frontend/package-lock.json', 'skydash/frontend/package.json') }}
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The cache key includes 'package-lock.json', but this file does not exist in the repository. The cache key will fail to generate a hash for the missing file. Consider either generating a package-lock.json file by running 'npm install' locally and committing it, or update the cache key to only use 'package.json'. Using package-lock.json is recommended for reproducible builds.

Suggested change
key: ${{ runner.os }}-node-${{ hashFiles('skydash/frontend/package-lock.json', 'skydash/frontend/package.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('skydash/frontend/package.json') }}

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +62

- name: Cache node_modules
uses: actions/cache@v4
with:
path: skydash/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('skydash/frontend/package-lock.json', 'skydash/frontend/package.json') }}
restore-keys: |
${{ runner.os }}-node-

Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The setup-node action (v4) has built-in caching support when you specify the 'cache' parameter. This manual cache action is redundant and can be removed. Instead, add 'cache: npm' to the setup-node step and specify 'cache-dependency-path: skydash/frontend/package-lock.json' (or just package.json if package-lock.json doesn't exist). This simplifies the workflow and follows GitHub Actions best practices.

Suggested change
- name: Cache node_modules
uses: actions/cache@v4
with:
path: skydash/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('skydash/frontend/package-lock.json', 'skydash/frontend/package.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: npm
cache-dependency-path: skydash/frontend/package-lock.json

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.

2 participants