Skip to content

ci(identity): migrate identity-service CI to GitHub Actions#14390

Open
dylanjeffers wants to merge 5 commits into
mainfrom
ci/identity-service-github-actions
Open

ci(identity): migrate identity-service CI to GitHub Actions#14390
dylanjeffers wants to merge 5 commits into
mainfrom
ci/identity-service-github-actions

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/workflows/identity.yml covering install, lint, typecheck, test, and Docker push for identity-service — equivalent to the CircleCI jobs under .circleci/src/workflows/identity.yml.
  • Tests run against GHA service containers (postgres:11.1 + redis:7.0); ts-mocha is invoked directly with the env vars packages/identity-service/scripts/run-tests.sh exports, avoiding the audius-compose/docker-compose dependency on the runner.
  • Docker push (main only) uses docker/build-push-action with audius/identity-service:${{ github.sha }} as the tag, matching audius-compose push --prod identity-service. Authenticates via DOCKERHUB_USERNAME / DOCKERHUB_PASS secrets and notifies Slack on failure via SLACK_DAILY_DEPLOY_WEBHOOK.
  • Disables the CircleCI identity workflow trigger via path filtering in .circleci/config.yml (run-identity-workflow false) and adds a NOTE comment to .circleci/src/workflows/identity.yml. Matches the pattern used when web/mobile were migrated.

Test plan

  • Open this PR and confirm only Identity Service CI/CD runs on the diff (lint, typecheck, test).
  • Confirm the lint job passes — equivalent of npx turbo run lint --filter=identity-service.
  • Confirm the typecheck job passes — equivalent of npx turbo run typecheck --filter=identity-service.
  • Confirm the test job spins up the postgres + redis service containers, builds identity-service's workspace deps via turbo, and runs the ts-mocha suite to completion.
  • Confirm the docker push job is skipped on PR (if: github.ref == 'refs/heads/main' && github.event_name == 'push').
  • After merge, verify the docker push job runs on main, tags as the merge commit SHA, and pushes to Docker Hub. Confirm Slack failure notification path if anything blows up.
  • Verify the CircleCI identity workflow stays a no-op (the path filter forces run-identity-workflow false).

Notes

The required secrets (DOCKERHUB_USERNAME, DOCKERHUB_PASS, SLACK_DAILY_DEPLOY_WEBHOOK) need to be present in the repo's Actions secrets — same secrets the CircleCI dockerhub / slack-secrets contexts referenced. If those names differ on the GH side, the docker-push job will need a tweak.

🤖 Generated with Claude Code

Adds .github/workflows/identity.yml covering install, lint, typecheck,
test, and docker push — mirroring the jobs previously defined under
.circleci/src/workflows/identity.yml. Disables the CircleCI workflow
trigger via path filtering (matches how web/mobile were migrated).

Tests now run against GHA service containers (postgres:11.1 + redis:7.0)
and ts-mocha is invoked directly with the same env vars run-tests.sh
exports, avoiding the audius-compose / docker-compose dependency.

Docker push (main only) uses docker/build-push-action with the git SHA
as the tag, matching what audius-compose push --prod identity-service
produced.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

⚠️ No Changeset found

Latest commit: 6d4a9a8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented May 22, 2026

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9412812 Triggered Generic Password b32026b .github/workflows/identity.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14390.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

dylanjeffers and others added 4 commits May 22, 2026 16:32
Match the secret names pedalboard's build-services workflow uses (these
are org-level secrets on AudiusProject) instead of the CircleCI-era
DOCKERHUB_USERNAME / DOCKERHUB_PASS, which aren't configured as GitHub
Actions secrets.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CircleCI's test-identity-service entrypoint shifted "test" off and ran
`npx mocha` with no args, so mocha used its default
`test/*.{js,cjs,mjs}` glob — only the .js tests, never `test/index.ts`.
src/app.js only requires .js modules (routes/index.js filters to
`.js`), so the .ts solana relay tree never loaded and the missing
solana env vars didn't matter.

`ts-mocha test/index.ts` exposed that path and crashed on
`new PublicKey('')` in solanaRelayChecks.ts. Switch to plain
`npx mocha` to mirror CircleCI exactly. Filling in real solana env
vars (or unblocking the .ts tests) is out of scope for the migration.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PR #14207 removed src/models/notification.js but left
20191107223636-create-viewed-field.js calling models.Notification.update().
On a fresh DB the migration crashes with "Cannot read properties of
undefined (reading 'update')". The break went undetected because
CircleCI was disabled before that PR landed.

Replace the ORM call with a raw UPDATE — the Notifications table itself
is still created by 20191025193919-create-notification.js and was never
dropped, so the migration still has a real table to write to.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
15/16 tests passed on the previous run; the lone failure was the
test-authentication-routes beforeEach hitting the 12s default. Each
hook re-runs all ~50 migrations from scratch, which exceeds the
window on ubuntu-latest. Pass --timeout 60000 to give the runner
headroom without changing the .mocharc default used locally.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant