This repository includes comprehensive GitHub Actions workflows for continuous integration and deployment.
The main CI/CD pipeline runs on every push and pull request to main and develop branches.
- Lint and Type Check: Runs linting and type checking for frontend and backend
- Build: Builds all three components (frontend, backend, contracts)
- Test: Runs unit and integration tests
- Security Scan: Performs security audits on all components
- Docker Build: Builds Docker images for frontend and backend
- Deploy Preview: Deploys to preview environment for pull requests
# Run linting across all components
npm run lint
# Run type checking
npm run typecheck
# Run all tests
npm run test
# Build all components
npm run ci:build
# Security audit
npm run security:auditSpecialized workflow for Stellar smart contracts, triggered when contract files change.
- Contract Linting: Runs Rust clippy and fmt checks
- Contract Testing: Runs unit, integration, and contract tests
- Contract Build: Builds contracts in release mode
- Contract Deploy: Deploys contracts to Stellar network (main branch only)
- Security Scan: Runs cargo-audit and cargo-deny for security
# Lint contracts
npm run lint:contracts
# Test contracts
npm run test:contracts
# Build contracts
npm run build:contractsYou can run the same commands locally that the CI/CD pipeline uses:
# Check everything before committing
npm run ci:check
# Build everything
npm run ci:build
# Run security audit
npm run security:auditFor contract deployment, the following secrets are required:
STELLAR_SECRET_KEY: Stellar account secret key for deploymentSTELLAR_NETWORK_PASSPHRASE: Network passphrase (Testnet/Public)
- Main branch: Requires passing CI checks before merge
- Develop branch: Used for feature integration
- Pull requests: Trigger full CI pipeline
- Push:
main,developbranches - Pull Request:
main,developbranches
- Push:
main,developbranches (whenstellar-contracts/**files change) - Pull Request:
main,developbranches (whenstellar-contracts/**files change)
The workflows generate the following artifacts:
frontend-build: Built frontend filesbackend-build: Built backend filesstellar-contracts: Compiled contract binaries
Security scanning includes:
- npm audit: Checks for known vulnerabilities in Node.js dependencies
- cargo audit: Checks for known vulnerabilities in Rust dependencies
- cargo-deny: Enforces security policies for Rust dependencies
- Automatically deployed for pull requests
- URL provided in GitHub Actions summary
- Triggered on push to
mainbranch - Deploys contracts to Stellar network
- Updates Docker images
- Lint Failures: Run
npm run lintlocally to fix issues - Type Errors: Run
npm run typecheckto identify type issues - Test Failures: Run
npm testto debug failing tests - Security Vulnerabilities: Review
npm auditoutput and update dependencies
- Check GitHub Actions logs for detailed error messages
- Run the same commands locally to reproduce issues
- Use
actions/checkout@v4to ensure proper code checkout - Verify environment variables and secrets are properly configured
- Commit Messages: Use descriptive commit messages
- Pull Requests: Create focused PRs with clear descriptions
- Testing: Ensure all tests pass before merging
- Security: Address security vulnerabilities promptly
- Documentation: Update this README when workflows change