Skip to content

ci: eliminate duplicate PR runs, add pr-gate#22

Merged
nikolareljin merged 5 commits into
mainfrom
feat/ci-optimization
May 25, 2026
Merged

ci: eliminate duplicate PR runs, add pr-gate#22
nikolareljin merged 5 commits into
mainfrom
feat/ci-optimization

Conversation

@nikolareljin

@nikolareljin nikolareljin commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • `ci.yml`: removed `pull_request` trigger (was firing 5 jobs twice per PR push); added `paths-ignore` with recursive `**/*.md` glob; CI install switched to `npm ci` with lockfile-based cache
  • `pr-gate.yml`: new — backend flake8 syntax check + frontend build on every PR; `paths-ignore` intentionally omitted (required status check must not be skippable)
  • `frontend/package-lock.json`: added lockfile so `npm ci` works in CI
  • `frontend/package.json`: bumped vite 5→6.4.2 and vitest 1→3.x to fix CVEs GHSA-4w7w-66w2-5vf9 (vite path traversal) and GHSA-67mh-4wv8-2f99 (esbuild); `@vitejs/plugin-react` updated to 4.7.0 for vite 6 compatibility
  • Full Docker builds and docker-compose validation stay in `ci.yml` (push-only) — no point rebuilding images on every PR commit

Test plan

  • Push to main triggers `ci.yml` only (backend lint, frontend build, Docker builds, config validate, security scan)
  • PR open/push triggers `pr-gate.yml` only (2 jobs: backend lint, frontend build)
  • No duplicate runs on PR pushes
  • `npm audit` reports 0 vulnerabilities after vite/vitest upgrade

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

This PR restructures GitHub Actions workflows to avoid duplicate CI runs on PR pushes by moving lightweight PR checks into a dedicated workflow while keeping heavier Docker-related work push-only.

Changes:

  • Removed the pull_request trigger from ci.yml and added paths-ignore under push.
  • Added a new pr-gate.yml workflow to run backend flake8 syntax checks and a frontend build on PRs.
  • Added PR-level concurrency cancellation to reduce redundant in-flight runs.

Reviewed changes

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

File Description
.github/workflows/pr-gate.yml New PR-only “gate” workflow that runs lightweight backend linting and a frontend build, with concurrency cancellation.
.github/workflows/ci.yml Converts CI to push-only and ignores docs/Markdown-only changes to reduce unnecessary runs.

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

Comment thread .github/workflows/pr-gate.yml Outdated
Comment thread .github/workflows/pr-gate.yml
Comment thread .github/workflows/pr-gate.yml
Comment thread .github/workflows/ci.yml Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2102b65df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/pr-gate.yml Outdated
- Generate frontend/package-lock.json so npm ci works in pr-gate
- Remove paths-ignore from pr-gate.yml (required status checks must always run)
- Fix *.md → **/*.md in ci.yml paths-ignore for recursive matching
Fixes GHSA-4w7w-66w2-5vf9 (vite path traversal) and
GHSA-67mh-4wv8-2f99 (esbuild). Bumps @vitejs/plugin-react
to 4.7.0 for vite 6 compatibility. Build verified clean.

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

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

Comment thread frontend/package.json
Comment thread frontend/package-lock.json

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

@nikolareljin
nikolareljin merged commit f8787b4 into main May 25, 2026
4 checks passed
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