Skip to content

Add GitHub Actions CI/CD workflows#1

Merged
rajivsinclair merged 1 commit intomainfrom
github-actions-migration
Dec 5, 2025
Merged

Add GitHub Actions CI/CD workflows#1
rajivsinclair merged 1 commit intomainfrom
github-actions-migration

Conversation

@rajivsinclair
Copy link
Copy Markdown
Contributor

@rajivsinclair rajivsinclair commented Dec 5, 2025

Summary

  • Migrates CI/CD from CircleCI to GitHub Actions
  • Adds test.yml workflow for running tests and linting on feature branches and PRs
  • Adds deploy.yml workflow for building, pushing Docker images, and deploying to GKE on main/staging branches

Environment Variables

All required secrets have been configured in the repository settings:

  • GCLOUD_SERVICE_KEY_BASE64
  • DJANGO_SECRET_KEY
  • MAPBOX_KEY
  • GA_MEASUREMENT_ID
  • GA_STAGING_MEASUREMENT_ID

Test plan

  • Merge to staging branch and verify deploy workflow runs successfully
  • Check that Docker image is built with correct build args and pushed to GCR
  • Verify deployment to GKE completes
  • Test production deployment after staging validation

🤖 Generated with Claude Code


Important

Migrates CI/CD from CircleCI to GitHub Actions, adding workflows for testing and deployment with environment variable configuration.

  • CI/CD Migration:
    • Migrates from CircleCI to GitHub Actions.
    • Adds test.yml for tests and linting on feature branches and PRs.
    • Adds deploy.yml for Docker image building and GKE deployment on main/staging branches.
  • Environment Variables:
    • Configures secrets: GCLOUD_SERVICE_KEY_BASE64, DJANGO_SECRET_KEY, MAPBOX_KEY, GA_MEASUREMENT_ID, GA_STAGING_MEASUREMENT_ID.
  • Workflows:
    • test.yml: Runs ESLint and tests, uploads results, and reports to Coveralls.
    • deploy.yml: Builds Docker images, pushes to GCR, and deploys to GKE, verifying deployment status.

This description was created by Ellipsis for 7600725. You can customize this summary. It will automatically update as commits are pushed.

- test.yml: Run tests, lint on feature branches and PRs
- deploy.yml: Build, push, and deploy on main/staging

Migrating from CircleCI to GitHub Actions for CI/CD pipeline.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings December 5, 2025 17:56
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

Copy link
Copy Markdown

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

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.

ℹ️ 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 on lines +71 to +74
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY_BASE64 }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use raw service account JSON instead of base64 in auth

google-github-actions/auth@v2 requires credentials_json to be the literal service account JSON, but the workflow passes the base64-encoded key (GCLOUD_SERVICE_KEY_BASE64). That string is not valid JSON, so the auth step fails before any gcloud commands run, aborting both the build-and-push and deploy jobs. The secret needs to be decoded or stored as raw JSON for authentication to succeed.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 7600725 in 2 minutes and 42 seconds. Click for details.
  • Reviewed 193 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/deploy.yml:25
  • Draft comment:
    Consider using a current Node.js LTS version (e.g. 16 or 18) instead of 14.15.3 to avoid potential EOL issues.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. .github/workflows/deploy.yml:126
  • Draft comment:
    Consider using input redirection with 'envsubst < kubernetes/frontend.yml' instead of 'cat kubernetes/frontend.yml | envsubst' for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. .github/workflows/deploy.yml:87
  • Draft comment:
    Ensure that secrets passed as build-args (e.g. MAPBOX_KEY) are not inadvertently exposed in the final image layers or build logs; consider using Docker best practices for secret management.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The comment starts with "Ensure that..." which is a red flag according to the rules - comments that ask the PR author to verify, ensure, or double-check things are not useful. The comment is also speculative in nature - it says "consider using Docker best practices" without pointing to a specific problem or providing a concrete solution. It doesn't definitively state that there IS a problem, just that there COULD be one. The comment doesn't provide actionable guidance on what specifically to change. While secret management is important, this comment is more of a general security reminder rather than identifying a specific issue with the code. However, passing secrets as build-args is actually a known Docker anti-pattern that can expose secrets in image layers and build history. This could be a legitimate security concern that warrants a code change to use Docker secrets or BuildKit secret mounts instead. While the security concern is valid in principle, the comment violates the rule about not asking the author to "ensure" things. It's also not actionable - it doesn't say "change this to use BuildKit secrets" but rather "consider using best practices." Without seeing the Dockerfile or knowing how these build args are used, we can't definitively say there's a problem. The comment is speculative and advisory rather than pointing to a concrete issue. This comment should be deleted because it starts with "Ensure that..." which explicitly violates the rules, and it's speculative/advisory rather than identifying a definite problem requiring a code change. It asks the author to verify something rather than providing clear, actionable guidance.
4. .github/workflows/deploy.yml:72
  • Draft comment:
    Verify that GCLOUD_SERVICE_KEY_BASE64 is provided in the correct JSON format; if it's base64 encoded, ensure it is decoded as needed by the Google auth action.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. .github/workflows/test.yml:25
  • Draft comment:
    Consider upgrading to a current Node.js LTS version (e.g. 16 or 18) as Node 14.15.3 may soon reach end-of-life.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_6TGOWvfZhc6bpaGw

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

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 migrates CI/CD from CircleCI to GitHub Actions, introducing two new workflow files for automated testing and deployment. The workflows maintain the existing branching strategy where feature branches and PRs run tests only, while staging and main branches trigger full deployment pipelines to GKE.

Key Changes:

  • Adds test.yml workflow for automated testing and linting on feature branches and pull requests
  • Adds deploy.yml workflow for building Docker images, pushing to GCR, and deploying to GKE on main/staging branches
  • Maintains environment-specific configurations (production vs staging) with appropriate build arguments and Google Analytics IDs

Reviewed changes

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

File Description
.github/workflows/test.yml Defines test workflow that runs ESLint, Jest tests, and uploads coverage to Coveralls for non-deployment branches
.github/workflows/deploy.yml Defines deployment workflow with test, build-and-push, and deploy jobs for main/staging branches, including GKE deployment

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14.15.3'
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Node.js version 14.15.3 reached end of life in April 2023 and no longer receives security updates. Consider upgrading to a supported LTS version (e.g., Node.js 18 or 20) to ensure security patches and compatibility with modern dependencies.

Suggested change
node-version: '14.15.3'
node-version: '18.x'

Copilot uses AI. Check for mistakes.
FRONTEND_IMAGE_TAG: ${{ needs.build-and-push.outputs.image-tag }}
GOOGLE_PROJECT_ID: ${{ env.GOOGLE_PROJECT_ID }}
run: |
cat kubernetes/frontend.yml | envsubst | kubectl apply -n ${{ needs.build-and-push.outputs.namespace }} -f -
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The envsubst command is used but the required gettext-base package is not installed. Add a step before deployment to install it:

- name: Install envsubst
  run: sudo apt-get update && sudo apt-get install -y gettext-base

Copilot uses AI. Check for mistakes.
Comment on lines +71 to +74
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY_BASE64 }}
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The credentials_json parameter expects JSON format, but the secret name GCLOUD_SERVICE_KEY_BASE64 suggests it contains base64-encoded data. If the secret is base64-encoded (as used in CircleCI with base64 -d), authentication will fail. Either:

  1. Store the service key JSON directly in the secret (recommended for GitHub Actions), or
  2. Decode it first: add a step to decode and write to a file, then use credentials_file parameter instead
Suggested change
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY_BASE64 }}
- name: Decode Google Cloud service account key
run: |
echo "${{ secrets.GCLOUD_SERVICE_KEY_BASE64 }}" | base64 -d > gcloud-key.json
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_file: gcloud-key.json

Copilot uses AI. Check for mistakes.
Comment on lines +105 to +109
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY_BASE64 }}

Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The credentials_json parameter expects JSON format, but the secret name GCLOUD_SERVICE_KEY_BASE64 suggests it contains base64-encoded data. If the secret is base64-encoded (as used in CircleCI with base64 -d), authentication will fail. Either:

  1. Store the service key JSON directly in the secret (recommended for GitHub Actions), or
  2. Decode it first: add a step to decode and write to a file, then use credentials_file parameter instead
Suggested change
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY_BASE64 }}
- name: Decode Google Cloud credentials
run: |
echo "${{ secrets.GCLOUD_SERVICE_KEY_BASE64 }}" | base64 -d > gcloud-key.json
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_file: gcloud-key.json

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +51
name: Test

on:
push:
branches-ignore:
- main
- staging
- develop
pull_request:
branches:
- main
- staging
- develop

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14.15.3'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: ESLint
run: yarn lint

- name: Run tests
run: yarn test:ci
env:
JEST_JUNIT_OUTPUT_DIR: ./reports/

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: ./reports/

- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: yarn coveralls
continue-on-error: true
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The CircleCI configuration includes integration tests (integration-test-non-interactive and integration-test-interactive jobs) that are not present in this GitHub Actions workflow. These integration tests use Cypress to test the application end-to-end with a backend, database, and Elasticsearch. Consider adding a similar integration test job to maintain test coverage parity with the previous CI setup.

Copilot uses AI. Check for mistakes.
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14.15.3'
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Node.js version 14.15.3 reached end of life in April 2023 and no longer receives security updates. Consider upgrading to a supported LTS version (e.g., Node.js 18 or 20) to ensure security patches and compatibility with modern dependencies.

Suggested change
node-version: '14.15.3'
node-version: '18.x'

Copilot uses AI. Check for mistakes.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 5, 2025

Warning

Rate limit exceeded

@rajivsinclair has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 44 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between dcd6eb4 and 7600725.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch github-actions-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rajivsinclair rajivsinclair merged commit 59f868c into main Dec 5, 2025
13 checks passed
@rajivsinclair rajivsinclair deleted the github-actions-migration branch December 5, 2025 19:30
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