| name | salesforce-ci-integration |
| description | Configure Salesforce CI/CD with GitHub Actions, SFDX deployments, and Apex testing.
Use when setting up automated testing, configuring CI pipelines for metadata deployment,
or integrating Salesforce tests into your build process.
Trigger with phrases like "salesforce CI", "salesforce GitHub Actions",
"salesforce automated tests", "CI salesforce", "sfdx deploy CI".
|
| allowed-tools | Read, Write, Edit, Bash(gh:*), Bash(sf:*) |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","crm","salesforce"] |
| compatibility | Designed for Claude Code |
Salesforce CI Integration
Overview
Set up CI/CD pipelines for Salesforce using GitHub Actions with JWT-based authentication, automated Apex testing, and metadata deployment.
Prerequisites
- GitHub repository with Actions enabled
- Salesforce Connected App with JWT Bearer flow configured
- RSA key pair (private key stored as GitHub Secret)
- Scratch org or sandbox for test execution
Instructions
Step 1: Create GitHub Actions Workflow
Create .github/workflows/salesforce-ci.yml:
name: Salesforce CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install Salesforce CLI
run: npm install -g @salesforce/cli
- name: Authenticate to Salesforce (JWT)