Added github actions flow for CI concerns#181
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI workflow to run checks on pull requests, and streamlines the backend Docker build by removing lint/test execution from the image build stage.
Changes:
- Introduces
.github/workflows/ci.ymlwith separate jobs for linting, formatting, building, and testing/coverage. - Removes lint/test steps (and related config copies) from
packages/backend/Dockerfileso these checks are handled by CI instead of duringdocker build.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/backend/Dockerfile | Stops running lint/tests during the Docker build stage to reduce build-time responsibilities. |
| .github/workflows/ci.yml | Adds PR-based CI jobs for lint, format checking, build, and test/coverage enforcement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/ci.yml
Outdated
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| - run: npm ci | ||
| - run: npm run lint |
There was a problem hiding this comment.
The workflow runs npm ci independently in every job, which significantly increases CI time/cost (even with the npm download cache, install/linking still repeats 4x). Consider consolidating these steps into a single job that runs lint/format/build/test sequentially, or using a reusable workflow/composite action + artifacts to avoid reinstalling dependencies for each job.
There was a problem hiding this comment.
@copilot fix this problem specifically using the reusable workflow/composite action + artifacts approach.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@sfreeman422 I've opened a new pull request, #182, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Refactor CI to use composite action + artifacts to avoid repeated npm ci Co-authored-by: sfreeman422 <16405652+sfreeman422@users.noreply.github.com> Agent-Logs-Url: https://github.com/dev-chat/mocker/sessions/4c494880-0851-4259-9bf2-0172fcf671c4 * Fix actions permissions for artifact upload/download in CI workflow Co-authored-by: sfreeman422 <16405652+sfreeman422@users.noreply.github.com> Agent-Logs-Url: https://github.com/dev-chat/mocker/sessions/9c6de18d-4d6d-4a01-a0c4-6091c6499711 * Fix: restore execute permissions on node_modules/.bin after artifact download Co-authored-by: sfreeman422 <16405652+sfreeman422@users.noreply.github.com> Agent-Logs-Url: https://github.com/dev-chat/mocker/sessions/c08c9005-bef2-4528-b4ab-b197997e8da9 * Fix: tar node_modules to preserve symlinks and permissions across artifact upload/download Co-authored-by: sfreeman422 <16405652+sfreeman422@users.noreply.github.com> Agent-Logs-Url: https://github.com/dev-chat/mocker/sessions/95656348-9a9c-4213-a56b-4604864084e8 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfreeman422 <16405652+sfreeman422@users.noreply.github.com>
No description provided.